Use e2epod.WaitForPodTerminatedInNamespace 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 WaitForPodTerminated() with the e2epod function.
This commit is contained in:
Kenichi Omichi
2020-03-20 20:27:09 +00:00
parent da18fd14d3
commit d191660c25
4 changed files with 5 additions and 10 deletions

View File

@@ -53,7 +53,6 @@ import (
// TODO: Remove the following imports (ref: https://github.com/kubernetes/kubernetes/issues/81245)
e2emetrics "k8s.io/kubernetes/test/e2e/framework/metrics"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
)
const (
@@ -510,11 +509,6 @@ func (f *Framework) AddNamespacesToDelete(namespaces ...*v1.Namespace) {
}
}
// WaitForPodTerminated waits for the pod to be terminated with the given reason.
func (f *Framework) WaitForPodTerminated(podName, reason string) error {
return e2epod.WaitForPodTerminatedInNamespace(f.ClientSet, podName, reason, f.Namespace.Name)
}
// ClientConfig an externally accessible method for reading the kube client config.
func (f *Framework) ClientConfig() *rest.Config {
ret := rest.CopyConfig(f.clientConfig)