Ensure images are pulled after eviction tests

This commit is contained in:
Odin Ugedal 2021-06-16 12:52:21 +02:00
parent f363322d4a
commit e2477171ca
No known key found for this signature in database
GPG Key ID: AFF9C8242CF7A7AF

View File

@ -38,6 +38,14 @@ var _ = SIGDescribe("SystemNodeCriticalPod [Slow] [Serial] [Disruptive] [NodeFea
// this test only manipulates pods in kube-system
f.SkipNamespaceCreation = true
ginkgo.AfterEach(func() {
if framework.TestContext.PrepullImages {
// The test may cause the prepulled images to be evicted,
// prepull those images again to ensure this test not affect following tests.
PrePullAllImages()
}
})
ginkgo.Context("when create a system-node-critical pod", func() {
tempSetCurrentKubeletConfig(f, func(initialConfig *kubeletconfig.KubeletConfiguration) {
diskConsumed := resource.MustParse("200Mi")