Merge branch 'master' of github.com:kubernetes/minikube into fix-download-test

pull/10219/head
Sharif Elgamal 2021-01-25 14:37:47 -08:00
commit afa9aafcd2
5 changed files with 17 additions and 8 deletions

View File

@ -328,6 +328,7 @@ func (k *Bootstrapper) applyCNI(cfg config.ClusterConfig) error {
return nil return nil
} }
register.Reg.SetStep(register.ConfiguringCNI)
out.Step(style.CNI, "Configuring {{.name}} (Container Networking Interface) ...", out.V{"name": cnm.String()}) out.Step(style.CNI, "Configuring {{.name}} (Container Networking Interface) ...", out.V{"name": cnm.String()})
if err := cnm.Apply(k.c); err != nil { if err := cnm.Apply(k.c); err != nil {

View File

@ -41,6 +41,7 @@ const (
PreparingKubernetesCerts RegStep = "Generating certificates" PreparingKubernetesCerts RegStep = "Generating certificates"
PreparingKubernetesControlPlane RegStep = "Booting control plane" PreparingKubernetesControlPlane RegStep = "Booting control plane"
PreparingKubernetesBootstrapToken RegStep = "Configuring RBAC rules" PreparingKubernetesBootstrapToken RegStep = "Configuring RBAC rules"
ConfiguringCNI RegStep = "Configuring CNI"
VerifyingKubernetes RegStep = "Verifying Kubernetes" VerifyingKubernetes RegStep = "Verifying Kubernetes"
EnablingAddons RegStep = "Enabling Addons" EnablingAddons RegStep = "Enabling Addons"
Done RegStep = "Done" Done RegStep = "Done"
@ -85,6 +86,7 @@ func init() {
PreparingKubernetesCerts, PreparingKubernetesCerts,
PreparingKubernetesControlPlane, PreparingKubernetesControlPlane,
PreparingKubernetesBootstrapToken, PreparingKubernetesBootstrapToken,
ConfiguringCNI,
ConfiguringLHEnv, ConfiguringLHEnv,
VerifyingKubernetes, VerifyingKubernetes,
EnablingAddons, EnablingAddons,

View File

@ -122,7 +122,7 @@ func validateIncreasingCurrentSteps(ctx context.Context, t *testing.T, ces []*cl
} }
} }
func TestJSONOutputError(t *testing.T) { func TestErrorJSONOutput(t *testing.T) {
profile := UniqueProfileName("json-output-error") profile := UniqueProfileName("json-output-error")
ctx, cancel := context.WithTimeout(context.Background(), Minutes(2)) ctx, cancel := context.WithTimeout(context.Background(), Minutes(2))
defer Cleanup(t, profile, cancel) defer Cleanup(t, profile, cancel)

View File

@ -115,6 +115,11 @@ func HyperVDriver() bool {
return strings.Contains(*startArgs, "--driver=hyperv") || strings.Contains(*startArgs, "--vm-driver=hyperv") return strings.Contains(*startArgs, "--driver=hyperv") || strings.Contains(*startArgs, "--vm-driver=hyperv")
} }
// VirtualboxDriver returns whether or not this test is using the VirtualBox driver
func VirtualboxDriver() bool {
return strings.Contains(*startArgs, "--driver=virtualbox") || strings.Contains(*startArgs, "--vm-driver=virtualbox")
}
// DockerDriver returns whether or not this test is using the docker or podman driver // DockerDriver returns whether or not this test is using the docker or podman driver
func DockerDriver() bool { func DockerDriver() bool {
return strings.Contains(*startArgs, "--driver=docker") || strings.Contains(*startArgs, "--vm-driver=docker") return strings.Contains(*startArgs, "--driver=docker") || strings.Contains(*startArgs, "--vm-driver=docker")

View File

@ -51,7 +51,6 @@ func TestStartStop(t *testing.T) {
"--kvm-qemu-uri=qemu:///system", "--kvm-qemu-uri=qemu:///system",
"--disable-driver-mounts", "--disable-driver-mounts",
"--keep-context=false", "--keep-context=false",
"--container-runtime=docker",
}}, }},
{"newest-cni", constants.NewestKubernetesVersion, []string{ {"newest-cni", constants.NewestKubernetesVersion, []string{
"--feature-gates", "--feature-gates",
@ -60,14 +59,13 @@ func TestStartStop(t *testing.T) {
"--extra-config=kubelet.network-plugin=cni", "--extra-config=kubelet.network-plugin=cni",
"--extra-config=kubeadm.pod-network-cidr=192.168.111.111/16", "--extra-config=kubeadm.pod-network-cidr=192.168.111.111/16",
}}, }},
{"containerd", constants.DefaultKubernetesVersion, []string{ {"default-k8s-different-port", constants.DefaultKubernetesVersion, []string{
"--container-runtime=containerd",
"--docker-opt",
"containerd=/var/run/containerd/containerd.sock",
"--apiserver-port=8444", "--apiserver-port=8444",
}}, }},
{"crio", "v1.15.7", []string{ {"no-preload", constants.NewestKubernetesVersion, []string{
"--container-runtime=crio", "--preload=false",
}},
{"disable-driver-mounts", constants.DefaultKubernetesVersion, []string{
"--disable-driver-mounts", "--disable-driver-mounts",
"--extra-config=kubeadm.ignore-preflight-errors=SystemVerification", "--extra-config=kubeadm.ignore-preflight-errors=SystemVerification",
}}, }},
@ -87,6 +85,9 @@ func TestStartStop(t *testing.T) {
if !strings.Contains(tc.name, "docker") && NoneDriver() { if !strings.Contains(tc.name, "docker") && NoneDriver() {
t.Skipf("skipping %s - incompatible with none driver", t.Name()) t.Skipf("skipping %s - incompatible with none driver", t.Name())
} }
if strings.Contains(tc.name, "disable_driver_mounts") && !VirtualboxDriver() {
t.Skipf("skipping %s - only runs on virtualbox", t.Name())
}
waitFlag := "--wait=true" waitFlag := "--wait=true"
if strings.Contains(tc.name, "cni") { // wait=app_running is broken for CNI https://github.com/kubernetes/minikube/issues/7354 if strings.Contains(tc.name, "cni") { // wait=app_running is broken for CNI https://github.com/kubernetes/minikube/issues/7354