From 96f34ea06310fe7e1a76e762f9f837a9fb6e8f85 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Wed, 27 May 2020 15:54:07 -0700 Subject: [PATCH] fix tests --- pkg/minikube/machine/cluster_test.go | 2 +- test/integration/functional_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/minikube/machine/cluster_test.go b/pkg/minikube/machine/cluster_test.go index 6171098932..80e5e7389e 100644 --- a/pkg/minikube/machine/cluster_test.go +++ b/pkg/minikube/machine/cluster_test.go @@ -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) } diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index 60b3011377..a22cb6f0af 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -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()) } }