mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
use e2epod.WaitForPodRunningInNamespaceSlow directly
This commit is contained in:
parent
53e86a814d
commit
aa52bfe4d6
@ -525,12 +525,6 @@ func (f *Framework) WaitForPodReady(podName string) error {
|
||||
return e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, podName, f.Namespace.Name, PodStartTimeout)
|
||||
}
|
||||
|
||||
// WaitForPodRunningSlow waits for the pod to run in the namespace.
|
||||
// It has a longer timeout then WaitForPodRunning (util.slowPodStartTimeout).
|
||||
func (f *Framework) WaitForPodRunningSlow(podName string) error {
|
||||
return e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, podName, 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)
|
||||
|
@ -584,7 +584,7 @@ func validateDNSResults(f *framework.Framework, pod *v1.Pod, fileNames []string)
|
||||
framework.Failf("ginkgo.Failed to create pod %s/%s: %v", pod.Namespace, pod.Name, err)
|
||||
}
|
||||
|
||||
framework.ExpectNoError(f.WaitForPodRunningSlow(pod.Name))
|
||||
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, pod.Name, f.Namespace.Name))
|
||||
|
||||
ginkgo.By("retrieving the pod")
|
||||
pod, err := podClient.Get(context.TODO(), pod.Name, metav1.GetOptions{})
|
||||
@ -612,7 +612,7 @@ func validateTargetedProbeOutput(f *framework.Framework, pod *v1.Pod, fileNames
|
||||
framework.Failf("ginkgo.Failed to create pod %s/%s: %v", pod.Namespace, pod.Name, err)
|
||||
}
|
||||
|
||||
framework.ExpectNoError(f.WaitForPodRunningSlow(pod.Name))
|
||||
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, pod.Name, f.Namespace.Name))
|
||||
|
||||
ginkgo.By("retrieving the pod")
|
||||
pod, err := podClient.Get(context.TODO(), pod.Name, metav1.GetOptions{})
|
||||
|
@ -148,7 +148,7 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
|
||||
fmtPod = testPDPod([]string{diskName}, host0Name, false, 1)
|
||||
_, err = podClient.Create(context.TODO(), fmtPod, metav1.CreateOptions{})
|
||||
framework.ExpectNoError(err, "Failed to create fmtPod")
|
||||
framework.ExpectNoError(f.WaitForPodRunningSlow(fmtPod.Name))
|
||||
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, fmtPod.Name, f.Namespace.Name))
|
||||
|
||||
ginkgo.By("deleting the fmtPod")
|
||||
framework.ExpectNoError(podClient.Delete(context.TODO(), fmtPod.Name, *metav1.NewDeleteOptions(0)), "Failed to delete fmtPod")
|
||||
@ -176,7 +176,7 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
|
||||
ginkgo.By("creating host0Pod on node0")
|
||||
_, err = podClient.Create(context.TODO(), host0Pod, metav1.CreateOptions{})
|
||||
framework.ExpectNoError(err, fmt.Sprintf("Failed to create host0Pod: %v", err))
|
||||
framework.ExpectNoError(f.WaitForPodRunningSlow(host0Pod.Name))
|
||||
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, host0Pod.Name, f.Namespace.Name))
|
||||
framework.Logf("host0Pod: %q, node0: %q", host0Pod.Name, host0Name)
|
||||
|
||||
var containerName, testFile, testFileContents string
|
||||
@ -200,7 +200,7 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
|
||||
ginkgo.By("creating host1Pod on node1")
|
||||
_, err = podClient.Create(context.TODO(), host1Pod, metav1.CreateOptions{})
|
||||
framework.ExpectNoError(err, "Failed to create host1Pod")
|
||||
framework.ExpectNoError(f.WaitForPodRunningSlow(host1Pod.Name))
|
||||
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, host1Pod.Name, f.Namespace.Name))
|
||||
framework.Logf("host1Pod: %q, node1: %q", host1Pod.Name, host1Name)
|
||||
|
||||
if readOnly {
|
||||
@ -282,7 +282,7 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
|
||||
host0Pod = testPDPod(diskNames, host0Name, false /* readOnly */, numContainers)
|
||||
_, err = podClient.Create(context.TODO(), host0Pod, metav1.CreateOptions{})
|
||||
framework.ExpectNoError(err, fmt.Sprintf("Failed to create host0Pod: %v", err))
|
||||
framework.ExpectNoError(f.WaitForPodRunningSlow(host0Pod.Name))
|
||||
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, host0Pod.Name, f.Namespace.Name))
|
||||
|
||||
ginkgo.By(fmt.Sprintf("writing %d file(s) via a container", numPDs))
|
||||
containerName := "mycontainer"
|
||||
@ -385,7 +385,7 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
|
||||
_, err = podClient.Create(context.TODO(), host0Pod, metav1.CreateOptions{})
|
||||
framework.ExpectNoError(err, fmt.Sprintf("Failed to create host0Pod: %v", err))
|
||||
ginkgo.By("waiting for host0Pod to be running")
|
||||
framework.ExpectNoError(f.WaitForPodRunningSlow(host0Pod.Name))
|
||||
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, host0Pod.Name, f.Namespace.Name))
|
||||
|
||||
ginkgo.By("writing content to host0Pod")
|
||||
testFile := "/testpd1/tracker"
|
||||
|
@ -149,7 +149,7 @@ func PerformVolumeLifeCycleInParallel(f *framework.Framework, client clientset.I
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
ginkgo.By(fmt.Sprintf("%v Waiting for the Pod: %v to be in the running state", logPrefix, pod.Name))
|
||||
err = f.WaitForPodRunningSlow(pod.Name)
|
||||
err = e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, pod.Name, f.Namespace.Name)
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
// Get the copy of the Pod to know the assigned node name.
|
||||
|
Loading…
Reference in New Issue
Block a user