2016-12-05 22:49:52 +00:00
|
|
|
// +build integration
|
|
|
|
|
|
|
|
/*
|
|
|
|
Copyright 2016 The Kubernetes Authors All rights reserved.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package integration
|
|
|
|
|
|
|
|
import (
|
2017-05-10 20:26:05 +00:00
|
|
|
"strings"
|
2016-12-05 22:49:52 +00:00
|
|
|
"testing"
|
|
|
|
|
2017-08-25 06:15:34 +00:00
|
|
|
"k8s.io/minikube/pkg/minikube/constants"
|
|
|
|
"k8s.io/minikube/pkg/minikube/machine"
|
2016-12-05 22:49:52 +00:00
|
|
|
"k8s.io/minikube/test/integration/util"
|
|
|
|
)
|
|
|
|
|
2017-05-30 20:23:24 +00:00
|
|
|
func TestFunctional(t *testing.T) {
|
|
|
|
minikubeRunner := util.MinikubeRunner{
|
|
|
|
BinaryPath: *binaryPath,
|
|
|
|
Args: *args,
|
|
|
|
T: t}
|
2016-12-05 22:49:52 +00:00
|
|
|
minikubeRunner.EnsureRunning()
|
2017-08-25 06:15:34 +00:00
|
|
|
integrationTestImages := []string{"busybox:glibc"}
|
|
|
|
if err := machine.CacheImages(integrationTestImages, constants.ImageCacheDir); err != nil {
|
|
|
|
t.Fatalf("caching images: %s", err)
|
|
|
|
}
|
|
|
|
if err := machine.LoadFromCacheBlocking(&minikubeRunner, constants.ImageCacheDir); err != nil {
|
|
|
|
t.Fatalf("loading images: %s", err)
|
|
|
|
}
|
2017-04-28 17:38:55 +00:00
|
|
|
// This one is not parallel, and ensures the cluster comes up
|
|
|
|
// before we run any other tests.
|
|
|
|
t.Run("Status", testClusterStatus)
|
2017-08-23 15:51:14 +00:00
|
|
|
|
2016-12-05 22:49:52 +00:00
|
|
|
t.Run("DNS", testClusterDNS)
|
2017-05-22 22:16:22 +00:00
|
|
|
t.Run("Logs", testClusterLogs)
|
2017-05-30 20:23:24 +00:00
|
|
|
t.Run("Addons", testAddons)
|
2016-12-05 22:49:52 +00:00
|
|
|
t.Run("Dashboard", testDashboard)
|
|
|
|
t.Run("ServicesList", testServicesList)
|
2017-02-26 03:05:07 +00:00
|
|
|
t.Run("Provisioning", testProvisioning)
|
2017-05-10 20:26:05 +00:00
|
|
|
|
|
|
|
if !strings.Contains(*args, "--vm-driver=none") {
|
|
|
|
t.Run("EnvVars", testClusterEnv)
|
|
|
|
t.Run("SSH", testClusterSSH)
|
|
|
|
// t.Run("Mounting", testMounting)
|
|
|
|
}
|
2016-12-05 22:49:52 +00:00
|
|
|
}
|