Skip to content

Commit 12ff8f2

Browse files
author
Kenichi Omichi
committed
Use e2epod.WaitForPodNoLongerRunningInNamespace directly
WaitForPod*() are just wrapper functions for e2epod package, and they made an invalid dependency to sub e2e framework from the core framework. So this replaces WaitForPodNoLongerRunning() with the e2epod function.
1 parent 990a380 commit 12ff8f2

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

test/e2e/common/sysctl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ var _ = framework.KubeDescribe("Sysctls [LinuxOnly] [NodeFeature:Sysctls]", func
8989
gomega.Expect(ev).To(gomega.BeNil())
9090

9191
ginkgo.By("Waiting for pod completion")
92-
err = f.WaitForPodNoLongerRunning(pod.Name)
92+
err = e2epod.WaitForPodNoLongerRunningInNamespace(f.ClientSet, pod.Name, f.Namespace.Name)
9393
framework.ExpectNoError(err)
9494
pod, err = podClient.Get(context.TODO(), pod.Name, metav1.GetOptions{})
9595
framework.ExpectNoError(err)
@@ -129,7 +129,7 @@ var _ = framework.KubeDescribe("Sysctls [LinuxOnly] [NodeFeature:Sysctls]", func
129129
gomega.Expect(ev).To(gomega.BeNil())
130130

131131
ginkgo.By("Waiting for pod completion")
132-
err = f.WaitForPodNoLongerRunning(pod.Name)
132+
err = e2epod.WaitForPodNoLongerRunningInNamespace(f.ClientSet, pod.Name, f.Namespace.Name)
133133
framework.ExpectNoError(err)
134134
pod, err = podClient.Get(context.TODO(), pod.Name, metav1.GetOptions{})
135135
framework.ExpectNoError(err)

test/e2e/framework/framework.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -539,12 +539,6 @@ func (f *Framework) WaitForPodRunningSlow(podName string) error {
539539
return e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, podName, f.Namespace.Name)
540540
}
541541

542-
// WaitForPodNoLongerRunning waits for the pod to no longer be running in the namespace, for either
543-
// success or failure.
544-
func (f *Framework) WaitForPodNoLongerRunning(podName string) error {
545-
return e2epod.WaitForPodNoLongerRunningInNamespace(f.ClientSet, podName, f.Namespace.Name)
546-
}
547-
548542
// ClientConfig an externally accessible method for reading the kube client config.
549543
func (f *Framework) ClientConfig() *rest.Config {
550544
ret := rest.CopyConfig(f.clientConfig)

0 commit comments

Comments
 (0)