Fix pre pull of images in DiskPressure tests

This waits for DiskPressure to no longer exist before pre pulling images
after a DiskPressure test. Otherwise we risk to pull images, while
kubelet evicts/removes them.
This commit is contained in:
Odin Ugedal
2019-09-07 14:59:46 +02:00
parent 3f33bfd801
commit ec605eb300
2 changed files with 26 additions and 2 deletions

View File

@@ -110,6 +110,13 @@ var _ = framework.KubeDescribe("SystemNodeCriticalPod [Slow] [Serial] [Disruptiv
return checkMirrorPodDisappear(f.ClientSet, mirrorPodName, ns)
}, time.Minute, time.Second*2).Should(gomega.BeNil())
ginkgo.By("making sure that node no longer has DiskPressure")
gomega.Eventually(func() error {
if hasNodeCondition(f, v1.NodeDiskPressure) {
return fmt.Errorf("Conditions havent returned to normal, node still has DiskPressure")
}
return nil
}, pressureDissapearTimeout, evictionPollInterval).Should(gomega.BeNil())
})
})
})