Skip to content

Commit 210c8c3

Browse files
author
Priya Wadhwa
committed
Move status command to TestFunctional/serial
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.
1 parent bf8c4e3 commit 210c8c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/integration/functional_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ func TestFunctional(t *testing.T) {
8383
{"StartWithProxy", validateStartWithProxy}, // Set everything else up for success
8484
{"SoftStart", validateSoftStart}, // do a soft start. ensure config didnt change.
8585
{"KubeContext", validateKubeContext}, // Racy: must come immediately after "minikube start"
86-
{"KubectlGetPods", validateKubectlGetPods}, // Make sure kubectl is returning pods
86+
{"KubectlGetPods", validateKubectlGetPods}, // Make sure apiserver is up
8787
{"CacheCmd", validateCacheCmd}, // Caches images needed for subsequent tests because of proxy
8888
{"MinikubeKubectlCmd", validateMinikubeKubectl}, // Make sure `minikube kubectl` works
89+
{"StatusCmd", validateStatusCmd}, // ensure apiserver is running and healthz check passes, so that we can test validateComponentHealth
8990
}
9091
for _, tc := range tests {
9192
tc := tc
@@ -109,7 +110,6 @@ func TestFunctional(t *testing.T) {
109110
{"DashboardCmd", validateDashboardCmd},
110111
{"DNS", validateDNS},
111112
{"DryRun", validateDryRun},
112-
{"StatusCmd", validateStatusCmd},
113113
{"LogsCmd", validateLogsCmd},
114114
{"MountCmd", validateMountCmd},
115115
{"ProfileCmd", validateProfileCmd},
@@ -229,7 +229,7 @@ func validateSoftStart(ctx context.Context, t *testing.T, profile string) {
229229
t.Errorf("expected cluster config node port before soft start to be %d but got %d", apiPortTest, beforeCfg.Config.KubernetesConfig.NodePort)
230230
}
231231

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

0 commit comments

Comments
 (0)