mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	test/e2e/kubectl test/e2e_kubeadm:Use e2eskipper package
This commit is contained in:
		@@ -46,6 +46,7 @@ go_library(
 | 
				
			|||||||
        "//test/e2e/framework/kubectl:go_default_library",
 | 
					        "//test/e2e/framework/kubectl:go_default_library",
 | 
				
			||||||
        "//test/e2e/framework/pod:go_default_library",
 | 
					        "//test/e2e/framework/pod:go_default_library",
 | 
				
			||||||
        "//test/e2e/framework/service:go_default_library",
 | 
					        "//test/e2e/framework/service:go_default_library",
 | 
				
			||||||
 | 
					        "//test/e2e/framework/skipper:go_default_library",
 | 
				
			||||||
        "//test/e2e/framework/testfiles:go_default_library",
 | 
					        "//test/e2e/framework/testfiles:go_default_library",
 | 
				
			||||||
        "//test/e2e/scheduling:go_default_library",
 | 
					        "//test/e2e/scheduling:go_default_library",
 | 
				
			||||||
        "//test/integration/etcd:go_default_library",
 | 
					        "//test/integration/etcd:go_default_library",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -74,6 +74,7 @@ import (
 | 
				
			|||||||
	e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"
 | 
						e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"
 | 
				
			||||||
	e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
 | 
						e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
 | 
				
			||||||
	e2eservice "k8s.io/kubernetes/test/e2e/framework/service"
 | 
						e2eservice "k8s.io/kubernetes/test/e2e/framework/service"
 | 
				
			||||||
 | 
						e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
 | 
				
			||||||
	"k8s.io/kubernetes/test/e2e/framework/testfiles"
 | 
						"k8s.io/kubernetes/test/e2e/framework/testfiles"
 | 
				
			||||||
	"k8s.io/kubernetes/test/e2e/scheduling"
 | 
						"k8s.io/kubernetes/test/e2e/scheduling"
 | 
				
			||||||
	"k8s.io/kubernetes/test/integration/etcd"
 | 
						"k8s.io/kubernetes/test/integration/etcd"
 | 
				
			||||||
@@ -234,7 +235,7 @@ var _ = SIGDescribe("Kubectl alpha client", func() {
 | 
				
			|||||||
		})
 | 
							})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ginkgo.It("should create a CronJob", func() {
 | 
							ginkgo.It("should create a CronJob", func() {
 | 
				
			||||||
			framework.SkipIfMissingResource(f.DynamicClient, cronJobGroupVersionResourceAlpha, f.Namespace.Name)
 | 
								e2eskipper.SkipIfMissingResource(f.DynamicClient, cronJobGroupVersionResourceAlpha, f.Namespace.Name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			schedule := "*/5 * * * ?"
 | 
								schedule := "*/5 * * * ?"
 | 
				
			||||||
			framework.RunKubectlOrDie(ns, "run", cjName, "--restart=OnFailure", "--generator=cronjob/v2alpha1",
 | 
								framework.RunKubectlOrDie(ns, "run", cjName, "--restart=OnFailure", "--generator=cronjob/v2alpha1",
 | 
				
			||||||
@@ -1832,7 +1833,7 @@ metadata:
 | 
				
			|||||||
		})
 | 
							})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ginkgo.It("should create a CronJob", func() {
 | 
							ginkgo.It("should create a CronJob", func() {
 | 
				
			||||||
			framework.SkipIfMissingResource(f.DynamicClient, cronJobGroupVersionResourceBeta, f.Namespace.Name)
 | 
								e2eskipper.SkipIfMissingResource(f.DynamicClient, cronJobGroupVersionResourceBeta, f.Namespace.Name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			schedule := "*/5 * * * ?"
 | 
								schedule := "*/5 * * * ?"
 | 
				
			||||||
			framework.RunKubectlOrDie(ns, "run", cjName, "--restart=OnFailure", "--generator=cronjob/v1beta1",
 | 
								framework.RunKubectlOrDie(ns, "run", cjName, "--restart=OnFailure", "--generator=cronjob/v1beta1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,6 +35,7 @@ go_test(
 | 
				
			|||||||
        "//staging/src/k8s.io/cluster-bootstrap/token/api:go_default_library",
 | 
					        "//staging/src/k8s.io/cluster-bootstrap/token/api:go_default_library",
 | 
				
			||||||
        "//test/e2e/framework:go_default_library",
 | 
					        "//test/e2e/framework:go_default_library",
 | 
				
			||||||
        "//test/e2e/framework/config:go_default_library",
 | 
					        "//test/e2e/framework/config:go_default_library",
 | 
				
			||||||
 | 
					        "//test/e2e/framework/skipper:go_default_library",
 | 
				
			||||||
        "//vendor/github.com/onsi/ginkgo:go_default_library",
 | 
					        "//vendor/github.com/onsi/ginkgo:go_default_library",
 | 
				
			||||||
        "//vendor/github.com/onsi/ginkgo/config:go_default_library",
 | 
					        "//vendor/github.com/onsi/ginkgo/config:go_default_library",
 | 
				
			||||||
        "//vendor/github.com/onsi/ginkgo/reporters:go_default_library",
 | 
					        "//vendor/github.com/onsi/ginkgo/reporters:go_default_library",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,6 +18,7 @@ package kubeadm
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"k8s.io/kubernetes/test/e2e/framework"
 | 
						"k8s.io/kubernetes/test/e2e/framework"
 | 
				
			||||||
 | 
						e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/onsi/ginkgo"
 | 
						"github.com/onsi/ginkgo"
 | 
				
			||||||
	"github.com/onsi/gomega"
 | 
						"github.com/onsi/gomega"
 | 
				
			||||||
@@ -77,7 +78,7 @@ var _ = Describe("DNS addon", func() {
 | 
				
			|||||||
		ginkgo.Context("kube-dns ServiceAccount", func() {
 | 
							ginkgo.Context("kube-dns ServiceAccount", func() {
 | 
				
			||||||
			ginkgo.It("should exist", func() {
 | 
								ginkgo.It("should exist", func() {
 | 
				
			||||||
				if dnsType != "kube-dns" {
 | 
									if dnsType != "kube-dns" {
 | 
				
			||||||
					framework.Skipf("Skipping because DNS type is %s", dnsType)
 | 
										e2eskipper.Skipf("Skipping because DNS type is %s", dnsType)
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				ExpectServiceAccount(f.ClientSet, kubeSystemNamespace, kubeDNSServiceAccountName)
 | 
									ExpectServiceAccount(f.ClientSet, kubeSystemNamespace, kubeDNSServiceAccountName)
 | 
				
			||||||
@@ -87,7 +88,7 @@ var _ = Describe("DNS addon", func() {
 | 
				
			|||||||
		ginkgo.Context("kube-dns Deployment", func() {
 | 
							ginkgo.Context("kube-dns Deployment", func() {
 | 
				
			||||||
			ginkgo.It("should exist and be properly configured", func() {
 | 
								ginkgo.It("should exist and be properly configured", func() {
 | 
				
			||||||
				if dnsType != "kube-dns" {
 | 
									if dnsType != "kube-dns" {
 | 
				
			||||||
					framework.Skipf("Skipping because DNS type is %s", dnsType)
 | 
										e2eskipper.Skipf("Skipping because DNS type is %s", dnsType)
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				d := GetDeployment(f.ClientSet, kubeSystemNamespace, kubeDNSDeploymentName)
 | 
									d := GetDeployment(f.ClientSet, kubeSystemNamespace, kubeDNSDeploymentName)
 | 
				
			||||||
@@ -101,7 +102,7 @@ var _ = Describe("DNS addon", func() {
 | 
				
			|||||||
		ginkgo.Context("CoreDNS ServiceAccount", func() {
 | 
							ginkgo.Context("CoreDNS ServiceAccount", func() {
 | 
				
			||||||
			ginkgo.It("should exist", func() {
 | 
								ginkgo.It("should exist", func() {
 | 
				
			||||||
				if dnsType != "CoreDNS" {
 | 
									if dnsType != "CoreDNS" {
 | 
				
			||||||
					framework.Skipf("Skipping because DNS type is %s", dnsType)
 | 
										e2eskipper.Skipf("Skipping because DNS type is %s", dnsType)
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				ExpectServiceAccount(f.ClientSet, kubeSystemNamespace, coreDNSServiceAccountName)
 | 
									ExpectServiceAccount(f.ClientSet, kubeSystemNamespace, coreDNSServiceAccountName)
 | 
				
			||||||
@@ -109,7 +110,7 @@ var _ = Describe("DNS addon", func() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			ginkgo.It("should have related ClusterRole and ClusterRoleBinding", func() {
 | 
								ginkgo.It("should have related ClusterRole and ClusterRoleBinding", func() {
 | 
				
			||||||
				if dnsType != "CoreDNS" {
 | 
									if dnsType != "CoreDNS" {
 | 
				
			||||||
					framework.Skipf("Skipping because DNS type is %s", dnsType)
 | 
										e2eskipper.Skipf("Skipping because DNS type is %s", dnsType)
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				ExpectClusterRole(f.ClientSet, coreDNSRoleName)
 | 
									ExpectClusterRole(f.ClientSet, coreDNSRoleName)
 | 
				
			||||||
@@ -120,7 +121,7 @@ var _ = Describe("DNS addon", func() {
 | 
				
			|||||||
		ginkgo.Context("CoreDNS ConfigMap", func() {
 | 
							ginkgo.Context("CoreDNS ConfigMap", func() {
 | 
				
			||||||
			ginkgo.It("should exist and be properly configured", func() {
 | 
								ginkgo.It("should exist and be properly configured", func() {
 | 
				
			||||||
				if dnsType != "CoreDNS" {
 | 
									if dnsType != "CoreDNS" {
 | 
				
			||||||
					framework.Skipf("Skipping because DNS type is %s", dnsType)
 | 
										e2eskipper.Skipf("Skipping because DNS type is %s", dnsType)
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				cm := GetConfigMap(f.ClientSet, kubeSystemNamespace, coreDNSConfigMap)
 | 
									cm := GetConfigMap(f.ClientSet, kubeSystemNamespace, coreDNSConfigMap)
 | 
				
			||||||
@@ -132,7 +133,7 @@ var _ = Describe("DNS addon", func() {
 | 
				
			|||||||
		ginkgo.Context("CoreDNS Deployment", func() {
 | 
							ginkgo.Context("CoreDNS Deployment", func() {
 | 
				
			||||||
			ginkgo.It("should exist and be properly configured", func() {
 | 
								ginkgo.It("should exist and be properly configured", func() {
 | 
				
			||||||
				if dnsType != "CoreDNS" {
 | 
									if dnsType != "CoreDNS" {
 | 
				
			||||||
					framework.Skipf("Skipping because DNS type is %s", dnsType)
 | 
										e2eskipper.Skipf("Skipping because DNS type is %s", dnsType)
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				d := GetDeployment(f.ClientSet, kubeSystemNamespace, coreDNSDeploymentName)
 | 
									d := GetDeployment(f.ClientSet, kubeSystemNamespace, coreDNSDeploymentName)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,6 +22,7 @@ import (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 | 
						metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 | 
				
			||||||
	"k8s.io/kubernetes/test/e2e/framework"
 | 
						"k8s.io/kubernetes/test/e2e/framework"
 | 
				
			||||||
 | 
						e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/onsi/ginkgo"
 | 
						"github.com/onsi/ginkgo"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -75,10 +76,10 @@ var _ = Describe("networking [setup-networking]", func() {
 | 
				
			|||||||
		ginkgo.Context("podSubnet", func() {
 | 
							ginkgo.Context("podSubnet", func() {
 | 
				
			||||||
			ginkgo.It("should be properly configured if specified in kubeadm-config", func() {
 | 
								ginkgo.It("should be properly configured if specified in kubeadm-config", func() {
 | 
				
			||||||
				if dualStack {
 | 
									if dualStack {
 | 
				
			||||||
					framework.Skipf("Skipping because cluster is dual-stack")
 | 
										e2eskipper.Skipf("Skipping because cluster is dual-stack")
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				if !podSubnetInKubeadmConfig {
 | 
									if !podSubnetInKubeadmConfig {
 | 
				
			||||||
					framework.Skipf("Skipping because podSubnet was not specified in kubeadm-config")
 | 
										e2eskipper.Skipf("Skipping because podSubnet was not specified in kubeadm-config")
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				cc := getClusterConfiguration(f.ClientSet)
 | 
									cc := getClusterConfiguration(f.ClientSet)
 | 
				
			||||||
				if _, ok := cc["networking"]; ok {
 | 
									if _, ok := cc["networking"]; ok {
 | 
				
			||||||
@@ -99,10 +100,10 @@ var _ = Describe("networking [setup-networking]", func() {
 | 
				
			|||||||
		ginkgo.Context("serviceSubnet", func() {
 | 
							ginkgo.Context("serviceSubnet", func() {
 | 
				
			||||||
			ginkgo.It("should be properly configured if specified in kubeadm-config", func() {
 | 
								ginkgo.It("should be properly configured if specified in kubeadm-config", func() {
 | 
				
			||||||
				if dualStack {
 | 
									if dualStack {
 | 
				
			||||||
					framework.Skipf("Skipping because cluster is dual-stack")
 | 
										e2eskipper.Skipf("Skipping because cluster is dual-stack")
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				if !serviceSubnetInKubeadmConfig {
 | 
									if !serviceSubnetInKubeadmConfig {
 | 
				
			||||||
					framework.Skipf("Skipping because serviceSubnet was not specified in kubeadm-config")
 | 
										e2eskipper.Skipf("Skipping because serviceSubnet was not specified in kubeadm-config")
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				cc := getClusterConfiguration(f.ClientSet)
 | 
									cc := getClusterConfiguration(f.ClientSet)
 | 
				
			||||||
				if _, ok := cc["networking"]; ok {
 | 
									if _, ok := cc["networking"]; ok {
 | 
				
			||||||
@@ -124,10 +125,10 @@ var _ = Describe("networking [setup-networking]", func() {
 | 
				
			|||||||
		ginkgo.Context("podSubnet", func() {
 | 
							ginkgo.Context("podSubnet", func() {
 | 
				
			||||||
			ginkgo.It("should be properly configured if specified in kubeadm-config", func() {
 | 
								ginkgo.It("should be properly configured if specified in kubeadm-config", func() {
 | 
				
			||||||
				if !dualStack {
 | 
									if !dualStack {
 | 
				
			||||||
					framework.Skipf("Skipping because cluster is not dual-stack")
 | 
										e2eskipper.Skipf("Skipping because cluster is not dual-stack")
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				if !podSubnetInKubeadmConfig {
 | 
									if !podSubnetInKubeadmConfig {
 | 
				
			||||||
					framework.Skipf("Skipping because podSubnet was not specified in kubeadm-config")
 | 
										e2eskipper.Skipf("Skipping because podSubnet was not specified in kubeadm-config")
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				cc := getClusterConfiguration(f.ClientSet)
 | 
									cc := getClusterConfiguration(f.ClientSet)
 | 
				
			||||||
				if _, ok := cc["networking"]; ok {
 | 
									if _, ok := cc["networking"]; ok {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user