e2e_node: clean up non-recommended import

This commit is contained in:
SataQiu
2019-07-28 12:49:36 +08:00
parent 23649560c0
commit 641d330f89
35 changed files with 763 additions and 763 deletions

View File

@@ -28,7 +28,7 @@ import (
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
imageutils "k8s.io/kubernetes/test/utils/image"
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo"
"k8s.io/klog"
)
@@ -150,9 +150,9 @@ func makePodToVerifyCgroupRemoved(baseName string) *v1.Pod {
var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() {
f := framework.NewDefaultFramework("kubelet-cgroup-manager")
Describe("QOS containers", func() {
Context("On enabling QOS cgroup hierarchy", func() {
It("Top level QoS containers should have been created [NodeConformance]", func() {
ginkgo.Describe("QOS containers", func() {
ginkgo.Context("On enabling QOS cgroup hierarchy", func() {
ginkgo.It("Top level QoS containers should have been created [NodeConformance]", func() {
if !framework.TestContext.KubeletConfig.CgroupsPerQOS {
return
}
@@ -165,9 +165,9 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() {
})
})
Describe("Pod containers [NodeConformance]", func() {
Context("On scheduling a Guaranteed Pod", func() {
It("Pod containers should have been created under the cgroup-root", func() {
ginkgo.Describe("Pod containers [NodeConformance]", func() {
ginkgo.Context("On scheduling a Guaranteed Pod", func() {
ginkgo.It("Pod containers should have been created under the cgroup-root", func() {
if !framework.TestContext.KubeletConfig.CgroupsPerQOS {
return
}
@@ -175,7 +175,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() {
guaranteedPod *v1.Pod
podUID string
)
By("Creating a Guaranteed pod in Namespace", func() {
ginkgo.By("Creating a Guaranteed pod in Namespace", func() {
guaranteedPod = f.PodClient().Create(&v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "pod" + string(uuid.NewUUID()),
@@ -193,14 +193,14 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() {
})
podUID = string(guaranteedPod.UID)
})
By("Checking if the pod cgroup was created", func() {
ginkgo.By("Checking if the pod cgroup was created", func() {
cgroupsToVerify := []string{"pod" + podUID}
pod := makePodToVerifyCgroups(cgroupsToVerify)
f.PodClient().Create(pod)
err := e2epod.WaitForPodSuccessInNamespace(f.ClientSet, pod.Name, f.Namespace.Name)
framework.ExpectNoError(err)
})
By("Checking if the pod cgroup was deleted", func() {
ginkgo.By("Checking if the pod cgroup was deleted", func() {
gp := int64(1)
err := f.PodClient().Delete(guaranteedPod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &gp})
framework.ExpectNoError(err)
@@ -211,8 +211,8 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() {
})
})
})
Context("On scheduling a BestEffort Pod", func() {
It("Pod containers should have been created under the BestEffort cgroup", func() {
ginkgo.Context("On scheduling a BestEffort Pod", func() {
ginkgo.It("Pod containers should have been created under the BestEffort cgroup", func() {
if !framework.TestContext.KubeletConfig.CgroupsPerQOS {
return
}
@@ -220,7 +220,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() {
podUID string
bestEffortPod *v1.Pod
)
By("Creating a BestEffort pod in Namespace", func() {
ginkgo.By("Creating a BestEffort pod in Namespace", func() {
bestEffortPod = f.PodClient().Create(&v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "pod" + string(uuid.NewUUID()),
@@ -238,14 +238,14 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() {
})
podUID = string(bestEffortPod.UID)
})
By("Checking if the pod cgroup was created", func() {
ginkgo.By("Checking if the pod cgroup was created", func() {
cgroupsToVerify := []string{"besteffort/pod" + podUID}
pod := makePodToVerifyCgroups(cgroupsToVerify)
f.PodClient().Create(pod)
err := e2epod.WaitForPodSuccessInNamespace(f.ClientSet, pod.Name, f.Namespace.Name)
framework.ExpectNoError(err)
})
By("Checking if the pod cgroup was deleted", func() {
ginkgo.By("Checking if the pod cgroup was deleted", func() {
gp := int64(1)
err := f.PodClient().Delete(bestEffortPod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &gp})
framework.ExpectNoError(err)
@@ -256,8 +256,8 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() {
})
})
})
Context("On scheduling a Burstable Pod", func() {
It("Pod containers should have been created under the Burstable cgroup", func() {
ginkgo.Context("On scheduling a Burstable Pod", func() {
ginkgo.It("Pod containers should have been created under the Burstable cgroup", func() {
if !framework.TestContext.KubeletConfig.CgroupsPerQOS {
return
}
@@ -265,7 +265,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() {
podUID string
burstablePod *v1.Pod
)
By("Creating a Burstable pod in Namespace", func() {
ginkgo.By("Creating a Burstable pod in Namespace", func() {
burstablePod = f.PodClient().Create(&v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "pod" + string(uuid.NewUUID()),
@@ -283,14 +283,14 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() {
})
podUID = string(burstablePod.UID)
})
By("Checking if the pod cgroup was created", func() {
ginkgo.By("Checking if the pod cgroup was created", func() {
cgroupsToVerify := []string{"burstable/pod" + podUID}
pod := makePodToVerifyCgroups(cgroupsToVerify)
f.PodClient().Create(pod)
err := e2epod.WaitForPodSuccessInNamespace(f.ClientSet, pod.Name, f.Namespace.Name)
framework.ExpectNoError(err)
})
By("Checking if the pod cgroup was deleted", func() {
ginkgo.By("Checking if the pod cgroup was deleted", func() {
gp := int64(1)
err := f.PodClient().Delete(burstablePod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &gp})
framework.ExpectNoError(err)