Updated the test case

pull/4177/head
Himanshu Pandey 2019-05-07 13:58:33 -07:00
parent e23a78489c
commit 64f990cec1
1 changed files with 5 additions and 8 deletions

View File

@ -92,18 +92,15 @@ func TestStartStop(t *testing.T) {
return r.CheckStatusNoFail(state.Stopped.String())
}
currentContext, err = kubectlRunner.RunCommand([]string{"config", "current-context"})
if err != nil {
t.Fatalf("Failed to fetch current-context")
}
if strings.TrimRight(string(currentContext), "\n") != "" {
t.Fatalf("Failed to unset the current-context %q", string(currentContext))
}
if err := util.Retry(t, checkStop, 5*time.Second, 6); err != nil {
t.Fatalf("timed out while checking stopped status: %v", err)
}
// running this command results in error when the current-context is not set
if err := r.Run("config current-context"); err != nil {
t.Logf("current-context is not set to minikube")
}
r.Start(test.args...)
r.CheckStatus(state.Running.String())