fix tests

pull/8290/head
Sharif Elgamal 2020-05-27 15:54:07 -07:00
parent 6f03adc8ac
commit 96f34ea063
2 changed files with 3 additions and 3 deletions

View File

@ -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)
}

View File

@ -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())
}
}