From f7f7ca7fcdf6bd04fb138b43601826d403eccb85 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 8 May 2020 19:03:03 -0700 Subject: [PATCH] Switch back to CleanupWithLogs, make more things fatal so that logs come sooner --- test/integration/start_stop_delete_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/integration/start_stop_delete_test.go b/test/integration/start_stop_delete_test.go index 347144d3ec..94dc09b30c 100644 --- a/test/integration/start_stop_delete_test.go +++ b/test/integration/start_stop_delete_test.go @@ -87,7 +87,7 @@ func TestStartStop(t *testing.T) { profile := UniqueProfileName(tc.name) ctx, cancel := context.WithTimeout(context.Background(), Minutes(40)) - defer Cleanup(t, profile, cancel) + defer CleanupWithLogs(t, profile, cancel) waitFlag := "--wait=true" if strings.Contains(tc.name, "cni") { // wait=app_running is broken for CNI https://github.com/kubernetes/minikube/issues/7354 @@ -109,21 +109,21 @@ func TestStartStop(t *testing.T) { rr, err = Run(t, exec.CommandContext(ctx, Target(), "stop", "-p", profile, "--alsologtostderr", "-v=3")) if err != nil { - t.Errorf("failed stopping minikube - first stop-. args %q : %v", rr.Command(), err) + t.Fatalf("failed stopping minikube - first stop-. args %q : %v", rr.Command(), err) } // The none driver never really stops if !NoneDriver() { got := Status(ctx, t, Target(), profile, "Host") if got != state.Stopped.String() { - t.Errorf("expected post-stop host status to be -%q- but got *%q*", state.Stopped, got) + t.Fatalf("expected post-stop host status to be -%q- but got *%q*", state.Stopped, got) } } // Enable an addon to assert it comes up afterwards rr, err = Run(t, exec.CommandContext(ctx, Target(), "addons", "enable", "dashboard", "-p", profile)) if err != nil { - t.Errorf("failed to enable an addon post-stop. args %q: %v", rr.Command(), err) + t.Fatalf("failed to enable an addon post-stop. args %q: %v", rr.Command(), err) } rr, err = Run(t, exec.CommandContext(ctx, Target(), startArgs...)) @@ -145,7 +145,7 @@ func TestStartStop(t *testing.T) { got := Status(ctx, t, Target(), profile, "Host") if got != state.Running.String() { - t.Errorf("expected host status after start-stop-start to be -%q- but got *%q*", state.Running, got) + t.Fatalf("expected host status after start-stop-start to be -%q- but got *%q*", state.Running, got) } if !NoneDriver() {