diff --git a/test/integration/containerd_test.go b/test/integration/containerd_test.go index d9660ddaee..be92f92533 100644 --- a/test/integration/containerd_test.go +++ b/test/integration/containerd_test.go @@ -56,8 +56,7 @@ func testGvisorRestart(t *testing.T) { t.Fatalf("waiting for gvisor controller to be up: %v", err) } - mk.RunCommand("stop", false) - mk.CheckStatus(state.Stopped.String()) + mk.RunCommand("stop", true) stdout, stderr, err := mk.Start() if err != nil { t.Fatalf("failed to start minikube (for profile %s) failed : %v \nstdout: %s \nstderr: %s", t.Name(), err, stdout, stderr) diff --git a/test/integration/util/minikube_runner.go b/test/integration/util/minikube_runner.go index 5778b77517..57cb85c74c 100644 --- a/test/integration/util/minikube_runner.go +++ b/test/integration/util/minikube_runner.go @@ -287,10 +287,11 @@ func (m *MinikubeRunner) Status() (status string, stderr string, err error) { cmd := fmt.Sprintf("status --format={{.Host}} %s", m.GlobalArgs) s := func() error { status, stderr, err = m.RunCommandRetriable(cmd) + status = strings.TrimRight(status, "\n") return err } err = RetryX(s, 2*time.Minute) - if err != nil && status == state.None.String() { + if err != nil && (status == state.None.String() || status == state.Stopped.String()) { err = nil // because https://github.com/kubernetes/minikube/issues/4932 } return status, stderr, err