diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index 8243d4a39967361ff0196c5dc9894405baa6687e..748894f2e0ba47d829476248b74d59a8993feda3 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -73,7 +73,7 @@ func readLineWithTimeout(b *bufio.Reader, timeout time.Duration) (string, error) } func testDashboard(t *testing.T) { - // t.Parallel() + t.Parallel() minikubeRunner := NewMinikubeRunner(t) cmd, out := minikubeRunner.RunDaemon("dashboard --url") defer func() { diff --git a/test/integration/proxy_test.go b/test/integration/proxy_test.go index 2d001548f405056fab6ac22d875eefdf4193cc61..d6bad5dcbddb8ba3c9edaa99cb7acdae0797a059 100644 --- a/test/integration/proxy_test.go +++ b/test/integration/proxy_test.go @@ -61,26 +61,29 @@ func setUpProxy(t *testing.T) (*http.Server, error) { } func TestProxy(t *testing.T) { + origHP := os.Getenv("HTTP_PROXY") + origNP := os.Getenv("NO_PROXY") srv, err := setUpProxy(t) - defer func(t *testing.T) { - err := srv.Shutdown(context.TODO()) // shutting down the http proxy after tests + if err != nil { + t.Fatalf("Failed to set up the test proxy: %s", err) + } + + defer func(t *testing.T) { // Clean up after setting up proxy + err = os.Setenv("HTTP_PROXY", origHP) if err != nil { - t.Errorf("Error shutting down the http proxy") + t.Errorf("Error reverting the HTTP_PROXY env") } - err = os.Setenv("HTTP_PROXY", "") + err = os.Setenv("NO_PROCY", origNP) if err != nil { t.Errorf("Error reverting the HTTP_PROXY env") } - err = os.Setenv("HTTPS_PROXY", "") + + err := srv.Shutdown(context.TODO()) // shutting down the http proxy after tests if err != nil { - t.Errorf("Error reverting the HTTPS_PROXY env") + t.Errorf("Error shutting down the http proxy") } - }(t) - if err != nil { - t.Fatalf("Failed to set up the test proxy: %s", err) - } t.Run("ConsoleWarnning", testProxyWarning) t.Run("DashboardProxy", testDashboard)