Merge pull request #95679 from EdDev/test-e2e-remove-w8-4-pod-running-after-createsync

test, e2e: Remove duplication when using PodClient.CreateSync
This commit is contained in:
Kubernetes Prow Robot
2020-10-27 15:32:11 -07:00
committed by GitHub
5 changed files with 5 additions and 31 deletions

View File

@@ -33,7 +33,6 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
e2edeployment "k8s.io/kubernetes/test/e2e/framework/deployment"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
e2eservice "k8s.io/kubernetes/test/e2e/framework/service"
imageutils "k8s.io/kubernetes/test/utils/image"
netutils "k8s.io/utils/net"
@@ -99,11 +98,7 @@ var _ = SIGDescribe("[Feature:IPv6DualStackAlphaFeature] [LinuxOnly]", func() {
}
ginkgo.By("submitting the pod to kubernetes")
podClient.CreateSync(pod)
framework.ExpectNoError(e2epod.WaitForPodNameRunningInNamespace(f.ClientSet, pod.Name, f.Namespace.Name))
p, err := podClient.Get(context.TODO(), pod.Name, metav1.GetOptions{})
framework.ExpectNoError(err, "Failed to get pod %q", pod.Name)
p := podClient.CreateSync(pod)
gomega.Expect(p.Status.PodIP).ShouldNot(gomega.BeEquivalentTo(""))
gomega.Expect(p.Status.PodIPs).ShouldNot(gomega.BeNil())
@@ -116,7 +111,7 @@ var _ = SIGDescribe("[Feature:IPv6DualStackAlphaFeature] [LinuxOnly]", func() {
framework.ExpectEqual(isIPv4(p.Status.PodIPs[0].IP) != isIPv4(p.Status.PodIPs[1].IP), true)
ginkgo.By("deleting the pod")
err = podClient.Delete(context.TODO(), pod.Name, *metav1.NewDeleteOptions(30))
err := podClient.Delete(context.TODO(), pod.Name, *metav1.NewDeleteOptions(30))
framework.ExpectNoError(err, "failed to delete pod")
})