e2e/framework: remove direct imports to pkg/api/v1/pod

This commit is contained in:
SataQiu
2020-03-18 11:10:06 +08:00
parent 7cadf86d75
commit 6a41f331da
9 changed files with 18 additions and 17 deletions

View File

@@ -32,7 +32,7 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
clientset "k8s.io/client-go/kubernetes"
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
"k8s.io/kubectl/pkg/util/podutils"
"k8s.io/kubernetes/pkg/client/conditions"
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
@@ -186,8 +186,8 @@ func podRunningAndReady(c clientset.Interface, podName, namespace string) wait.C
e2elog.Logf("The status of Pod %s is %s which is unexpected", podName, pod.Status.Phase)
return false, conditions.ErrPodCompleted
case v1.PodRunning:
e2elog.Logf("The status of Pod %s is %s (Ready = %v)", podName, pod.Status.Phase, podutil.IsPodReady(pod))
return podutil.IsPodReady(pod), nil
e2elog.Logf("The status of Pod %s is %s (Ready = %v)", podName, pod.Status.Phase, podutils.IsPodReady(pod))
return podutils.IsPodReady(pod), nil
}
e2elog.Logf("The status of Pod %s is %s, waiting for it to be Running (with Ready = true)", podName, pod.Status.Phase)
return false, nil