fix tests
parent
6f03adc8ac
commit
96f34ea063
|
|
@ -454,7 +454,7 @@ func TestCreateSSHShell(t *testing.T) {
|
|||
cc.Name = viper.GetString("profile")
|
||||
|
||||
cliArgs := []string{"exit"}
|
||||
if err := CreateSSHShell(api, cc, config.Node{Name: "minikube"}, cliArgs); err != nil {
|
||||
if err := CreateSSHShell(api, cc, config.Node{Name: "minikube"}, cliArgs, true); err != nil {
|
||||
t.Fatalf("Error running ssh command: %v", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -816,12 +816,12 @@ func validateSSHCmd(ctx context.Context, t *testing.T, profile string) {
|
|||
if NoneDriver() {
|
||||
t.Skipf("skipping: ssh unsupported by none")
|
||||
}
|
||||
want := "hello\n"
|
||||
want := "hello"
|
||||
rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", fmt.Sprintf("echo hello")))
|
||||
if err != nil {
|
||||
t.Errorf("failed to run an ssh command. args %q : %v", rr.Command(), err)
|
||||
}
|
||||
if rr.Stdout.String() != want {
|
||||
if strings.TrimSpace(rr.Stdout.String()) != want {
|
||||
t.Errorf("expected minikube ssh command output to be -%q- but got *%q*. args %q", want, rr.Stdout.String(), rr.Command())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue