blob: f062625fa69fc6b350e70770040c38567e6a982f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
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
}
|