specify context in kubectl call for test

pull/9559/head
Sharif Elgamal 2020-10-27 10:00:41 -07:00
parent 025eb5e48e
commit 4fc095df77
1 changed files with 2 additions and 2 deletions

View File

@ -328,10 +328,10 @@ func validateMinikubeKubectlDirectCall(ctx context.Context, t *testing.T, profil
}
defer os.Remove(dstfn) // clean up
kubectlArgs := []string{"get", "pods"}
kubectlArgs := []string{"--context", profile, "get", "pods"}
rr, err := Run(t, exec.CommandContext(ctx, dstfn, kubectlArgs...))
if err != nil {
t.Fatalf("failed to run kubectl directl. args %q: %v", rr.Command(), err)
t.Fatalf("failed to run kubectl directly. args %q: %v", rr.Command(), err)
}
}