Replace setupFailed with setupSucceeded because the Go docs lied.

pull/12243/head
Andriy Dzikh 2021-08-13 15:26:39 -07:00
parent 7697b41c73
commit 5c0177aff6
2 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ func TestAddons(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), Minutes(40))
defer Cleanup(t, profile, cancel)
setupFailed := t.Run("Setup", func(t *testing.T) {
setupSucceeded := t.Run("Setup", func(t *testing.T) {
// We don't need a dummy file is we're on GCE
if !detect.IsOnGCE() || detect.IsCloudShell() {
// Set an env var to point to our dummy credentials file
@ -105,7 +105,7 @@ func TestAddons(t *testing.T) {
}
})
if setupFailed {
if !setupSucceeded {
t.Fatalf("Failed setup for addon tests")
}

View File

@ -136,7 +136,7 @@ func validateServiceStable(ctx context.Context, t *testing.T, profile string) {
t.Skip("The test WaitService is broken on github actions in macos https://github.com/kubernetes/minikube/issues/8434")
}
checkRoutePassword(t)
setupFailed := t.Run("Setup", func(t *testing.T) {
setupSucceeded := t.Run("Setup", func(t *testing.T) {
client, err := kapi.Client(profile)
if err != nil {
t.Fatalf("failed to get Kubernetes client for %q: %v", profile, err)
@ -155,7 +155,7 @@ func validateServiceStable(ctx context.Context, t *testing.T, profile string) {
t.Fatal(errors.Wrap(err, "Error waiting for nginx service to be up"))
}
})
if setupFailed {
if !setupSucceeded {
t.Fatal("Failed setup")
}