tests: Prepull images commonly used test images

Some tests have a short timeout for starting the pods (1 minute), but if
those tests happen to be the first ones to run, and the images have to be
pulled, then the test could timeout, especially with larger images. This
commit will allow us to prepull commonly used E2E test images, so this issue
can be avoided.
This commit is contained in:
Claudiu Belu
2021-09-27 19:38:27 +03:00
parent 37efc5feec
commit 35e23afa50
5 changed files with 111 additions and 33 deletions

View File

@@ -53,7 +53,7 @@ var CurrentSuite Suite
// PrePulledImages are a list of images used in e2e/common tests. These images should be prepulled
// before tests starts, so that the tests won't fail due image pulling flakes.
// Currently, this is only used by node e2e test.
// Currently, this is only used by node e2e test and E2E tests.
// See also updateImageAllowList() in ../../e2e_node/image_list.go
// TODO(random-liu): Change the image puller pod to use similar mechanism.
var PrePulledImages = sets.NewString(
@@ -67,6 +67,16 @@ var PrePulledImages = sets.NewString(
imageutils.GetE2EImage(imageutils.NonRoot),
)
// WindowsPrePulledImages are a list of images used in e2e/common tests. These images should be prepulled
// before tests starts, so that the tests won't fail due image pulling flakes. These images also have
// Windows support. Currently, this is only used by E2E tests.
var WindowsPrePulledImages = sets.NewString(
imageutils.GetE2EImage(imageutils.Agnhost),
imageutils.GetE2EImage(imageutils.BusyBox),
imageutils.GetE2EImage(imageutils.Nginx),
imageutils.GetE2EImage(imageutils.Httpd),
)
type testImagesStruct struct {
AgnhostImage string
BusyBoxImage string