Skip to content

Commit

Permalink
Move status command to TestFunctional/serial
Browse files Browse the repository at this point in the history
I noticed that TestComponentHealth/parallel/ComponentHealth was failing with this error:

```
Error apiserver status: https://172.17.0.3:8441/healthz returned error 500:
[-]etcd failed: reason withheld
```

but by the time post mortem logs were printed the etcd container was up and running.

I think this test occasionally fails because apiserver healthz is not yet returning a 200 status when we run the test. We wait for healthz to return 200 on regular start, but not on soft start, which we run in `TestFunctional`.

`minikube status` runs the apiserver healthz check, so moving this command to the serial part of the test should ensure that `TestComponentHealth` will run with a healthy apiserver.
  • Loading branch information
Priya Wadhwa committed May 18, 2020
1 parent bf8c4e3 commit 210c8c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/integration/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ func TestFunctional(t *testing.T) {
{"StartWithProxy", validateStartWithProxy}, // Set everything else up for success
{"SoftStart", validateSoftStart}, // do a soft start. ensure config didnt change.
{"KubeContext", validateKubeContext}, // Racy: must come immediately after "minikube start"
{"KubectlGetPods", validateKubectlGetPods}, // Make sure kubectl is returning pods
{"KubectlGetPods", validateKubectlGetPods}, // Make sure apiserver is up
{"CacheCmd", validateCacheCmd}, // Caches images needed for subsequent tests because of proxy
{"MinikubeKubectlCmd", validateMinikubeKubectl}, // Make sure `minikube kubectl` works
{"StatusCmd", validateStatusCmd}, // ensure apiserver is running and healthz check passes, so that we can test validateComponentHealth
}
for _, tc := range tests {
tc := tc
Expand All @@ -109,7 +110,6 @@ func TestFunctional(t *testing.T) {
{"DashboardCmd", validateDashboardCmd},
{"DNS", validateDNS},
{"DryRun", validateDryRun},
{"StatusCmd", validateStatusCmd},
{"LogsCmd", validateLogsCmd},
{"MountCmd", validateMountCmd},
{"ProfileCmd", validateProfileCmd},
Expand Down Expand Up @@ -229,7 +229,7 @@ func validateSoftStart(ctx context.Context, t *testing.T, profile string) {
t.Errorf("expected cluster config node port before soft start to be %d but got %d", apiPortTest, beforeCfg.Config.KubernetesConfig.NodePort)
}

softStartArgs := []string{"start", "-p", profile, "--wait=all"}
softStartArgs := []string{"start", "-p", profile}
c := exec.CommandContext(ctx, Target(), softStartArgs...)
rr, err := Run(t, c)
if err != nil {
Expand Down

0 comments on commit 210c8c3

Please sign in to comment.