From 210c8c354fd7a098984ac0324b7289c93f256a76 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Mon, 18 May 2020 16:51:47 -0700 Subject: [PATCH] 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. --- test/integration/functional_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index 02b6e6690e3a..dddd3d5d5e3a 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -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 @@ -109,7 +110,6 @@ func TestFunctional(t *testing.T) { {"DashboardCmd", validateDashboardCmd}, {"DNS", validateDNS}, {"DryRun", validateDryRun}, - {"StatusCmd", validateStatusCmd}, {"LogsCmd", validateLogsCmd}, {"MountCmd", validateMountCmd}, {"ProfileCmd", validateProfileCmd}, @@ -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 {