mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00

Rename all files to _test.go and rename the package to e2e_test. This makes the linter less strict about things like dot imports. Add some unused nolint directives to silence some warnings, these can be used to find untested options so someone could add tests for them. Fixes #14996 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
32 lines
627 B
Go
32 lines
627 B
Go
package e2e_test
|
|
|
|
type sshMachine struct {
|
|
/*
|
|
--username string Username to use when ssh-ing into the VM.
|
|
*/
|
|
|
|
username string //nolint:unused
|
|
sshCommand []string
|
|
}
|
|
|
|
func (s sshMachine) buildCmd(m *machineTestBuilder) []string {
|
|
cmd := []string{"machine", "ssh"}
|
|
if len(m.name) > 0 {
|
|
cmd = append(cmd, m.name)
|
|
}
|
|
if len(s.sshCommand) > 0 {
|
|
cmd = append(cmd, s.sshCommand...)
|
|
}
|
|
return cmd
|
|
}
|
|
|
|
func (s *sshMachine) withUsername(name string) *sshMachine { //nolint:unused
|
|
s.username = name
|
|
return s
|
|
}
|
|
|
|
func (s *sshMachine) withSSHComand(sshCommand []string) *sshMachine {
|
|
s.sshCommand = sshCommand
|
|
return s
|
|
}
|