fix ssh test
parent
e2d4290800
commit
1881032044
|
@ -836,13 +836,14 @@ func validateSSHCmd(ctx context.Context, t *testing.T, profile string) {
|
|||
if NoneDriver() {
|
||||
t.Skipf("skipping: ssh unsupported by none")
|
||||
}
|
||||
want := "hello\n"
|
||||
want := profile+"\n"
|
||||
var rr *RunResult
|
||||
var err error
|
||||
if runtime.GOOS == "windows" { // golang exec powershell needs some tricks !
|
||||
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", fmt.Sprintf("echo hello")), true)
|
||||
minikube ssh --% "echo $(pwd)"
|
||||
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "--%", "cat /etc/hostname", true)
|
||||
} else {
|
||||
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", fmt.Sprintf("echo hello")))
|
||||
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "cat /etc/hostname"))
|
||||
}
|
||||
if ctx.Err() == context.DeadlineExceeded {
|
||||
t.Logf("failed to run command by deadline. exceeded timeout : %s", rr.Command())
|
||||
|
|
Loading…
Reference in New Issue