diff --git a/test/integration/a_download_only_test.go b/test/integration/a_download_only_test.go index 4a8becce0f..aa045b63c4 100644 --- a/test/integration/a_download_only_test.go +++ b/test/integration/a_download_only_test.go @@ -38,7 +38,7 @@ import ( // is used to cache images and binaries used by other parallel tests to avoid redownloading. // TestDownloadOnly tests the --download-only option func TestDownloadOnly(t *testing.T) { - p := profile(t) + p := profileName(t) mk := NewMinikubeRunner(t, p) if !isTestNoneDriver() { // none driver doesnt need to be deleted defer mk.TearDown(t) diff --git a/test/integration/containerd_test.go b/test/integration/containerd_test.go index b0664aec1b..e2541bd59d 100644 --- a/test/integration/containerd_test.go +++ b/test/integration/containerd_test.go @@ -41,7 +41,7 @@ func TestContainerd(t *testing.T) { } func testGvisorRestart(t *testing.T) { - p := profile(t) + p := profileName(t) if toParallel() { t.Parallel() } diff --git a/test/integration/docker_test.go b/test/integration/docker_test.go index b442498eed..718a228c8a 100644 --- a/test/integration/docker_test.go +++ b/test/integration/docker_test.go @@ -31,7 +31,7 @@ func TestDocker(t *testing.T) { if isTestNoneDriver() { t.Skip("skipping test as none driver does not bundle docker") } - p := profile(t) + p := profileName(t) if toParallel() { t.Parallel() } diff --git a/test/integration/flags.go b/test/integration/flags.go index 1a87fa86bb..f37a1a534d 100644 --- a/test/integration/flags.go +++ b/test/integration/flags.go @@ -58,9 +58,9 @@ func isTestNoneDriver() bool { return strings.Contains(*startArgs, "--vm-driver=none") } -// profile chooses a profile name based on the test name +// profileName chooses a profile name based on the test name // to be used in minikube and kubecontext across that test -func profile(t *testing.T) string { +func profileName(t *testing.T) string { if isTestNoneDriver() { return "minikube" } @@ -68,6 +68,9 @@ func profile(t *testing.T) string { if strings.Contains(p, "/") { // for i.e, TestFunctional/SSH returns TestFunctional p = strings.Split(p, "/")[0] } + if p == "TestFunctional" { + return "minikube" + } return p } diff --git a/test/integration/fn_addons.go b/test/integration/fn_addons.go index a4a1563161..70122964b3 100644 --- a/test/integration/fn_addons.go +++ b/test/integration/fn_addons.go @@ -41,7 +41,7 @@ import ( func testAddons(t *testing.T) { t.Parallel() - p := "minikube" + p := profileName(t) client, err := pkgutil.GetClient(p) if err != nil { t.Fatalf("Could not get kubernetes client: %v", err) @@ -78,7 +78,7 @@ func readLineWithTimeout(b *bufio.Reader, timeout time.Duration) (string, error) func testDashboard(t *testing.T) { t.Parallel() - p := "minikube" + p := profileName(t) mk := NewMinikubeRunner(t, p, "--wait=false") cmd, out := mk.RunDaemon("dashboard --url") defer func() { @@ -124,7 +124,7 @@ func testDashboard(t *testing.T) { func testIngressController(t *testing.T) { t.Parallel() - p := "minikube" + p := profileName(t) mk := NewMinikubeRunner(t, p, "--wait=false") kr := util.NewKubectlRunner(t, p) @@ -173,7 +173,7 @@ func testIngressController(t *testing.T) { func testServicesList(t *testing.T) { t.Parallel() - p := "minikube" + p := profileName(t) mk := NewMinikubeRunner(t, p) checkServices := func() error { @@ -189,7 +189,7 @@ func testServicesList(t *testing.T) { } func testRegistry(t *testing.T) { t.Parallel() - p := "minikube" + p := profileName(t) mk := NewMinikubeRunner(t, p) mk.RunCommand("addons enable registry", true) client, err := pkgutil.GetClient(p) diff --git a/test/integration/fn_cluster_dns.go b/test/integration/fn_cluster_dns.go index 6e6e5e6b81..5206a32699 100644 --- a/test/integration/fn_cluster_dns.go +++ b/test/integration/fn_cluster_dns.go @@ -32,7 +32,7 @@ import ( func testClusterDNS(t *testing.T) { t.Parallel() - p := "minikube" + p := profileName(t) client, err := pkgutil.GetClient(p) if err != nil { t.Fatalf("Error getting kubernetes client %v", err) diff --git a/test/integration/fn_cluster_env.go b/test/integration/fn_cluster_env.go index d787aab7fb..671c00b19a 100644 --- a/test/integration/fn_cluster_env.go +++ b/test/integration/fn_cluster_env.go @@ -30,7 +30,7 @@ import ( // Assert that docker-env subcommand outputs usable information for "docker ps" func testClusterEnv(t *testing.T) { t.Parallel() - p := "minikube" + p := profileName(t) mk := NewMinikubeRunner(t, p, "--wait=false") // Set a specific shell syntax so that we don't have to handle every possible user shell diff --git a/test/integration/fn_cluster_logs.go b/test/integration/fn_cluster_logs.go index 97be36f57b..c97912a916 100644 --- a/test/integration/fn_cluster_logs.go +++ b/test/integration/fn_cluster_logs.go @@ -25,7 +25,7 @@ import ( func testClusterLogs(t *testing.T) { t.Parallel() - p := "minikube" + p := profileName(t) mk := NewMinikubeRunner(t, p) logsCmdOutput := mk.GetLogs() diff --git a/test/integration/fn_cluster_ssh.go b/test/integration/fn_cluster_ssh.go index d87812e5fb..cb2744ae96 100644 --- a/test/integration/fn_cluster_ssh.go +++ b/test/integration/fn_cluster_ssh.go @@ -25,7 +25,7 @@ import ( func testClusterSSH(t *testing.T) { t.Parallel() - p := "minikube" + p := profileName(t) mk := NewMinikubeRunner(t, p, "--wait=false") expectedStr := "hello" sshCmdOutput, stderr := mk.RunCommand("ssh echo "+expectedStr, true) diff --git a/test/integration/fn_cluster_status.go b/test/integration/fn_cluster_status.go index 0aa45a445e..06128d0684 100644 --- a/test/integration/fn_cluster_status.go +++ b/test/integration/fn_cluster_status.go @@ -28,7 +28,7 @@ import ( ) func testClusterStatus(t *testing.T) { - p := "minikube" + p := profileName(t) kr := util.NewKubectlRunner(t, p) cs := api.ComponentStatusList{} diff --git a/test/integration/fn_mount.go b/test/integration/fn_mount.go index 35ad83c66e..d8d4fe38f8 100644 --- a/test/integration/fn_mount.go +++ b/test/integration/fn_mount.go @@ -42,7 +42,7 @@ func testMounting(t *testing.T) { } t.Parallel() - p := "minikube" + p := profileName(t) mk := NewMinikubeRunner(t, p, "--wait=false") tempDir, err := ioutil.TempDir("", "mounttest") diff --git a/test/integration/fn_profile.go b/test/integration/fn_profile.go index 875906a7ec..9160a21190 100644 --- a/test/integration/fn_profile.go +++ b/test/integration/fn_profile.go @@ -25,7 +25,7 @@ import ( // testProfileList tests the `minikube profile list` command func testProfileList(t *testing.T) { - p := "minikube" + p := profileName(t) t.Parallel() mk := NewMinikubeRunner(t, p, "--wait=false") out, stderr := mk.RunCommand("profile list", true) diff --git a/test/integration/fn_pv.go b/test/integration/fn_pv.go index 98fff74d52..e83c38ce32 100644 --- a/test/integration/fn_pv.go +++ b/test/integration/fn_pv.go @@ -39,7 +39,7 @@ var ( ) func testProvisioning(t *testing.T) { - p := "minikube" + p := profileName(t) t.Parallel() kr := util.NewKubectlRunner(t, p) diff --git a/test/integration/fn_tunnel.go b/test/integration/fn_tunnel.go index eac2f0cdcd..79e1b3af5b 100644 --- a/test/integration/fn_tunnel.go +++ b/test/integration/fn_tunnel.go @@ -45,7 +45,7 @@ func testTunnel(t *testing.T) { } t.Log("starting tunnel test...") - p := "minikube" + p := profileName(t) mk := NewMinikubeRunner(t, p, "--wait=false") go func() { output, stderr := mk.RunCommand("tunnel --alsologtostderr -v 8 --logtostderr", true) diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index be24a41d3b..35a49bb4a0 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -23,7 +23,8 @@ import ( ) func TestFunctional(t *testing.T) { - mk := NewMinikubeRunner(t, "minikube") + p := profileName(t) + mk := NewMinikubeRunner(t, p) stdout, stderr, err := mk.Start() if err != nil { t.Fatalf("failed to start minikube failed : %v\nstdout: %s\nstderr: %s", err, stdout, stderr) diff --git a/test/integration/iso_test.go b/test/integration/iso_test.go index cdc2440509..c407208881 100644 --- a/test/integration/iso_test.go +++ b/test/integration/iso_test.go @@ -25,7 +25,7 @@ import ( ) func TestISO(t *testing.T) { - p := profile(t) + p := profileName(t) if toParalle() { t.Parallel() } @@ -47,7 +47,7 @@ func TestISO(t *testing.T) { } func testMountPermissions(t *testing.T) { - p := profile(t) + p := profileName(t) mk := NewMinikubeRunner(t, p, "--wait=false") // test mount permissions mountPoints := []string{"/Users", "/hosthome"} @@ -70,7 +70,7 @@ func testMountPermissions(t *testing.T) { } func testPackages(t *testing.T) { - p := profile(t) + p := profileName(t) mk := NewMinikubeRunner(t, p, "--wait=false") packages := []string{ @@ -93,7 +93,7 @@ func testPackages(t *testing.T) { } func testPersistence(t *testing.T) { - p := profile(t) + p := profileName(t) mk := NewMinikubeRunner(t, p, "--wait=false") for _, dir := range []string{ diff --git a/test/integration/persistence_test.go b/test/integration/persistence_test.go index 78821fb4ae..96f04831c8 100644 --- a/test/integration/persistence_test.go +++ b/test/integration/persistence_test.go @@ -30,7 +30,7 @@ func TestPersistence(t *testing.T) { if isTestNoneDriver() { t.Skip("skipping test as none driver does not support persistence") } - p := profile(t) + p := profileName(t) if toParallel() { t.Parallel() } diff --git a/test/integration/start_stop_delete_test.go b/test/integration/start_stop_delete_test.go index effa95e8fc..bfa7721eec 100644 --- a/test/integration/start_stop_delete_test.go +++ b/test/integration/start_stop_delete_test.go @@ -31,7 +31,7 @@ import ( ) func TestStartStop(t *testing.T) { - p := profile(t) // gets profile name used for minikube and kube context + p := profileName(t) // gets profile name used for minikube and kube context if toParallel() { t.Parallel() } diff --git a/test/integration/version_upgrade_test.go b/test/integration/version_upgrade_test.go index 62a151c8bf..777c87e84c 100644 --- a/test/integration/version_upgrade_test.go +++ b/test/integration/version_upgrade_test.go @@ -53,7 +53,7 @@ func fileExists(fname string) error { // the odlest supported k8s version and then runs the current head minikube // and it tries to upgrade from the older supported k8s to news supported k8s func TestVersionUpgrade(t *testing.T) { - p := profile(t) + p := profileName(t) if toParallel() { t.Parallel() } diff --git a/test/integration/z_proxy_test.go b/test/integration/z_proxy_test.go index 0776305bec..3d1382959f 100644 --- a/test/integration/z_proxy_test.go +++ b/test/integration/z_proxy_test.go @@ -67,10 +67,8 @@ func setUpProxy(t *testing.T) (*http.Server, error) { func TestProxy(t *testing.T) { origHP := os.Getenv("HTTP_PROXY") origNP := os.Getenv("NO_PROXY") - p := profile(t) // profile name - if isTestNoneDriver() { - p = "minikube" - } + p := profileName(t) // profile name + if isTestNoneDriver() { // TODO fix this later t.Skip("Skipping proxy warning for none") @@ -110,7 +108,7 @@ func TestProxy(t *testing.T) { // testProxyWarning checks user is warned correctly about the proxy related env vars func testProxyWarning(t *testing.T) { - p := profile(t) // profile name + p := profileName(t) // profile name mk := NewMinikubeRunner(t, p) stdout, stderr, err := mk.Start() if err != nil { @@ -130,7 +128,7 @@ func testProxyWarning(t *testing.T) { // testProxyDashboard checks if dashboard URL is accessible if proxy is set func testProxyDashboard(t *testing.T) { - p := profile(t) // profile name + p := profileName(t) // profile name mk := NewMinikubeRunner(t, p) cmd, out := mk.RunDaemon("dashboard --url") defer func() {