From 7bbcf89525e9aaf03e0503119f959de62b21bb77 Mon Sep 17 00:00:00 2001 From: Nashwan Azhari Date: Thu, 9 Dec 2021 17:51:05 +0200 Subject: [PATCH] Add support for specifying custom test container images. This patch adds an optional `--test-images-file` argument for specifying the path to a YAML file containing custom container image references to be used in tests. Initial user-overridable image keys being `defaultTestContainerImage` (the image used in the majority of tests), and `webServerTestImage` (which is used in Networking-related tests) Signed-off-by: Nashwan Azhari --- docs/validation.md | 1 + pkg/framework/test_context.go | 32 ++++++++++++++++++++++++++ pkg/framework/util.go | 17 ++++++++------ pkg/validate/apparmor_linux.go | 2 +- pkg/validate/consts.go | 5 ++++ pkg/validate/container.go | 8 +++---- pkg/validate/container_linux.go | 2 +- pkg/validate/multi_container_linux.go | 2 +- pkg/validate/security_context_linux.go | 32 +++++++++++++------------- pkg/validate/selinux_linux.go | 2 +- 10 files changed, 72 insertions(+), 31 deletions(-) diff --git a/docs/validation.md b/docs/validation.md index 2efeb5a76c..e7cf9224b7 100644 --- a/docs/validation.md +++ b/docs/validation.md @@ -52,6 +52,7 @@ critest connects to Unix: `unix:///var/run/dockershim.sock` or Windows: `tcp://l - `-ginkgo.focus`: Only run the tests that match the regular expression. - `-image-endpoint`: Set the endpoint of image service. Same with runtime-endpoint if not specified. +- `-test-images-file`: Optional path to a YAML file containing references to custom container images to be used in tests. - `-runtime-endpoint`: Set the endpoint of runtime service. Default to `unix:///var/run/dockershim.sock` or Windows: `tcp://localhost:3735`. - `-ginkgo.skip`: Skip the tests that match the regular expression. - `-parallel`: The number of parallel test nodes to run (default 1). [ginkgo](https://github.com/onsi/ginkgo) must be installed to run parallel tests. diff --git a/pkg/framework/test_context.go b/pkg/framework/test_context.go index d732023d45..1e8d4bbc0f 100644 --- a/pkg/framework/test_context.go +++ b/pkg/framework/test_context.go @@ -18,14 +18,22 @@ package framework import ( "flag" + "fmt" "os" "path/filepath" "runtime" "time" "github.com/onsi/ginkgo/config" + "gopkg.in/yaml.v3" ) +// TestImageList aggregates references to the images used in tests. +type TestImageList struct { + DefaultTestContainerImage string `yaml:"defaultTestContainerImage"` + WebServerTestImage string `yaml:"webServerTestImage"` +} + // TestContextType is the type of test context. type TestContextType struct { // Report related settings. @@ -40,6 +48,10 @@ type TestContextType struct { RuntimeServiceTimeout time.Duration RuntimeHandler string + // Test images-related settings. + TestImagesFilePath string + TestImageList TestImageList + // Benchmark setting. Number int @@ -69,6 +81,7 @@ func RegisterFlags() { flag.StringVar(&TestContext.ReportPrefix, "report-prefix", "", "Optional prefix for JUnit XML reports. Default is empty, which doesn't prepend anything to the default name.") flag.StringVar(&TestContext.ReportDir, "report-dir", "", "Path to the directory where the JUnit XML reports should be saved. Default is empty, which doesn't generate these reports.") flag.StringVar(&TestContext.ImageServiceAddr, "image-endpoint", "", "Image service socket for client to connect.") + flag.StringVar(&TestContext.TestImagesFilePath, "test-images-file", "", "Optional path to a YAML file containing references to custom container images to be used in tests.") flag.DurationVar(&TestContext.ImageServiceTimeout, "image-service-timeout", 300*time.Second, "Timeout when trying to connect to image service.") svcaddr := "unix:///var/run/dockershim.sock" @@ -90,3 +103,22 @@ func RegisterFlags() { } flag.StringVar(&TestContext.RegistryPrefix, "registry-prefix", DefaultRegistryPrefix, "A possible registry prefix added to all images, like 'localhost:5000/'") } + +// Loads the custom images mapping file (if defined) into the TestContextType. +func (tc TestContextType) LoadCustomImagesFileIntoTestingContext() error { + Logf("Testing context container image list file: %s", TestContext.TestImagesFilePath) + if TestContext.TestImagesFilePath != "" { + fileContent, err := os.ReadFile(TestContext.TestImagesFilePath) + if err != nil { + return fmt.Errorf("error reading '%v' file contents: %v", TestContext.TestImagesFilePath, err) + } + + err = yaml.Unmarshal(fileContent, &TestContext.TestImageList) + if err != nil { + return fmt.Errorf("error unmarshalling '%v' YAML file: %v", TestContext.TestImagesFilePath, err) + } + } + + Logf("Testing context container image list: %+v", TestContext.TestImageList) + return nil +} diff --git a/pkg/framework/util.go b/pkg/framework/util.go index 162bb96238..33eedb3c79 100644 --- a/pkg/framework/util.go +++ b/pkg/framework/util.go @@ -46,9 +46,6 @@ var ( // DefaultPodLabels are labels used by default in pods DefaultPodLabels map[string]string - // DefaultContainerImage is the default image used for containers - DefaultContainerImage string - // DefaultContainerCommand is the default command used for containers DefaultContainerCommand []string @@ -103,18 +100,24 @@ const ( var _ = BeforeSuite(func() { if runtime.GOOS != "windows" || TestContext.IsLcow { DefaultPodLabels = DefaultLinuxPodLabels - DefaultContainerImage = DefaultLinuxContainerImage DefaultContainerCommand = DefaultLinuxContainerCommand DefaultPauseCommand = DefaultLinuxPauseCommand + TestContext.TestImageList.DefaultTestContainerImage = DefaultLinuxContainerImage if TestContext.IsLcow { DefaultPodLabels = DefaultLcowPodLabels } } else { DefaultPodLabels = DefaultWindowsPodLabels - DefaultContainerImage = DefaultWindowsContainerImage DefaultContainerCommand = DefaultWindowsContainerCommand DefaultPauseCommand = DefaultWindowsPauseCommand + TestContext.TestImageList.DefaultTestContainerImage = DefaultWindowsContainerImage + } + + // Load any custom image definitions: + err := TestContext.LoadCustomImagesFileIntoTestingContext() + if err != nil { + panic(err) } for _, callback := range beforeSuiteCallbacks { @@ -254,7 +257,7 @@ func CreateDefaultContainer(rc internalapi.RuntimeService, ic internalapi.ImageM containerName := prefix + NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: BuildContainerMetadata(containerName, DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: TestContext.TestImageList.DefaultTestContainerImage}, Command: DefaultContainerCommand, Linux: &runtimeapi.LinuxContainerConfig{}, } @@ -267,7 +270,7 @@ func CreatePauseContainer(rc internalapi.RuntimeService, ic internalapi.ImageMan containerName := prefix + NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: BuildContainerMetadata(containerName, DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: TestContext.TestImageList.DefaultTestContainerImage}, Command: DefaultPauseCommand, Linux: &runtimeapi.LinuxContainerConfig{}, } diff --git a/pkg/validate/apparmor_linux.go b/pkg/validate/apparmor_linux.go index e5cc615621..bc5921a96e 100644 --- a/pkg/validate/apparmor_linux.go +++ b/pkg/validate/apparmor_linux.go @@ -107,7 +107,7 @@ func createContainerWithAppArmor(rc internalapi.RuntimeService, ic internalapi.I containerName := "apparmor-test-" + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: []string{"touch", "/tmp/foo"}, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ diff --git a/pkg/validate/consts.go b/pkg/validate/consts.go index 1e9de64495..49172fdb5b 100644 --- a/pkg/validate/consts.go +++ b/pkg/validate/consts.go @@ -243,6 +243,11 @@ var _ = framework.AddBeforeSuiteCallback(func() { getDNSConfigContent = getDNSConfigWindowsContent getHostnameCmd = getHostnameWindowsCmd } + + // Override the web server test image if an explicit one is provided: + if framework.TestContext.TestImageList.WebServerTestImage != "" { + webServerImage = framework.TestContext.TestImageList.WebServerTestImage + } }) // Streaming test constants diff --git a/pkg/validate/container.go b/pkg/validate/container.go index fef50130d7..3141d0a71d 100644 --- a/pkg/validate/container.go +++ b/pkg/validate/container.go @@ -337,7 +337,7 @@ func createShellContainer(rc internalapi.RuntimeService, ic internalapi.ImageMan containerName := prefix + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: shellCmd, Linux: &runtimeapi.LinuxContainerConfig{}, Stdin: true, @@ -455,7 +455,7 @@ func createVolumeContainer(rc internalapi.RuntimeService, ic internalapi.ImageMa containerName := prefix + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, // mount host path to the same directory in container, and will check if hostPath isn't empty Mounts: []*runtimeapi.Mount{ @@ -477,7 +477,7 @@ func createLogContainer(rc internalapi.RuntimeService, ic internalapi.ImageManag path := fmt.Sprintf("%s.log", containerName) containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: logDefaultCmd, LogPath: path, } @@ -491,7 +491,7 @@ func createKeepLoggingContainer(rc internalapi.RuntimeService, ic internalapi.Im path := fmt.Sprintf("%s.log", containerName) containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: loopLogDefaultCmd, LogPath: path, } diff --git a/pkg/validate/container_linux.go b/pkg/validate/container_linux.go index 85908dc8b5..fce9cbe7e6 100644 --- a/pkg/validate/container_linux.go +++ b/pkg/validate/container_linux.go @@ -218,7 +218,7 @@ func createMountPropagationContainer(rc internalapi.RuntimeService, ic internala containerName := prefix + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, // Set Privileged in order to executing mount command in container Linux: &runtimeapi.LinuxContainerConfig{ diff --git a/pkg/validate/multi_container_linux.go b/pkg/validate/multi_container_linux.go index e2ea620605..47d681bffb 100644 --- a/pkg/validate/multi_container_linux.go +++ b/pkg/validate/multi_container_linux.go @@ -145,7 +145,7 @@ func createMultiContainerTestBusyboxContainer(rc internalapi.RuntimeService, ic containerName := prefix + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: []string{"sh", "-c", "echo " + defaultLog + "; sleep 1000"}, LogPath: fmt.Sprintf("%s.log", containerName), } diff --git a/pkg/validate/security_context_linux.go b/pkg/validate/security_context_linux.go index 560eca011c..bf4bd3a1d0 100644 --- a/pkg/validate/security_context_linux.go +++ b/pkg/validate/security_context_linux.go @@ -103,7 +103,7 @@ var _ = framework.KubeDescribe("Security Context", func() { command = []string{"sh", "-c", "sleep 1000"} prefix = "container-with-HostPID-test-" containerName = prefix + framework.NewUUID() - containerID, _, _ = createNamespaceContainer(rc, ic, podID, podConfig, containerName, framework.DefaultContainerImage, namespaceOption, command, "") + containerID, _, _ = createNamespaceContainer(rc, ic, podID, podConfig, containerName, framework.TestContext.TestImageList.DefaultTestContainerImage, namespaceOption, command, "") By("start container") startContainer(rc, containerID) @@ -145,7 +145,7 @@ var _ = framework.KubeDescribe("Security Context", func() { By("create a default container with namespace") prefix := "namespace-container-" containerName := prefix + framework.NewUUID() - containerID, _, _ := createNamespaceContainer(rc, ic, podID, podConfig, containerName, framework.DefaultContainerImage, namespaceOption, pauseCmd, "") + containerID, _, _ := createNamespaceContainer(rc, ic, podID, podConfig, containerName, framework.TestContext.TestImageList.DefaultTestContainerImage, namespaceOption, pauseCmd, "") By("start container") startContainer(rc, containerID) @@ -177,7 +177,7 @@ var _ = framework.KubeDescribe("Security Context", func() { By("create a default container with namespace") prefix := "namespace-container-" containerName := prefix + framework.NewUUID() - containerID, _, _ := createNamespaceContainer(rc, ic, podID, podConfig, containerName, framework.DefaultContainerImage, namespaceOption, pauseCmd, "") + containerID, _, _ := createNamespaceContainer(rc, ic, podID, podConfig, containerName, framework.TestContext.TestImageList.DefaultTestContainerImage, namespaceOption, pauseCmd, "") By("start container") startContainer(rc, containerID) @@ -294,7 +294,7 @@ var _ = framework.KubeDescribe("Security Context", func() { containerName := "container-with-SupplementalGroups-test-" + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -549,7 +549,7 @@ var _ = framework.KubeDescribe("Security Context", func() { containerName := "container-with-maskedpaths" + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -578,7 +578,7 @@ var _ = framework.KubeDescribe("Security Context", func() { containerName := "container-with-readonlypaths" + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -846,7 +846,7 @@ func createRunAsUserContainer(rc internalapi.RuntimeService, ic internalapi.Imag containerName := prefix + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -868,7 +868,7 @@ func createRunAsUserNameContainer(rc internalapi.RuntimeService, ic internalapi. containerName := prefix + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -890,7 +890,7 @@ func createRunAsGroupContainer(rc internalapi.RuntimeService, ic internalapi.Ima By("create a container with RunAsUser and RunAsGroup") containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: []string{"sh", "-c", "echo $(id -u):$(id -g)"}, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -913,7 +913,7 @@ func createInvalidRunAsGroupContainer(rc internalapi.RuntimeService, ic internal By("create a container with RunAsGroup without RunAsUser") containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: []string{"sh", "-c", "echo $(id -u):$(id -g)"}, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -970,7 +970,7 @@ func createReadOnlyRootfsContainer(rc internalapi.RuntimeService, ic internalapi path := fmt.Sprintf("%s.log", containerName) containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: []string{"sh", "-c", "touch test.go && [ -f test.go ] && echo 'Found'"}, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -1021,7 +1021,7 @@ func createPrivilegedContainer(rc internalapi.RuntimeService, ic internalapi.Ima containerName := prefix + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -1053,7 +1053,7 @@ func createCapabilityContainer(rc internalapi.RuntimeService, ic internalapi.Ima containerName := prefix + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -1086,7 +1086,7 @@ func createAndCheckHostNetwork(rc internalapi.RuntimeService, ic internalapi.Ima command := []string{"sh", "-c", "netstat -ln"} containerName := "container-with-HostNetwork-test-" + framework.NewUUID() path := fmt.Sprintf("%s.log", containerName) - containerID, _, logPath := createNamespaceContainer(rc, ic, podID, podConfig, containerName, framework.DefaultContainerImage, namespaceOptions, command, path) + containerID, _, logPath := createNamespaceContainer(rc, ic, podID, podConfig, containerName, framework.TestContext.TestImageList.DefaultTestContainerImage, namespaceOptions, command, path) By("start container") startContainer(rc, containerID) @@ -1154,7 +1154,7 @@ func seccompTestContainer(rc internalapi.RuntimeService, ic internalapi.ImageMan containerName := containerNamePrefix + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ @@ -1200,7 +1200,7 @@ func createSeccompContainer(rc internalapi.RuntimeService, containerName := prefix + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: []string{"sleep", "60"}, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{ diff --git a/pkg/validate/selinux_linux.go b/pkg/validate/selinux_linux.go index e3fb5d85ac..1d9f1d362e 100644 --- a/pkg/validate/selinux_linux.go +++ b/pkg/validate/selinux_linux.go @@ -161,7 +161,7 @@ func createContainerWithSelinux(rc internalapi.RuntimeService, ic internalapi.Im containerName := "selinux-test-" + framework.NewUUID() containerConfig := &runtimeapi.ContainerConfig{ Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), - Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, + Image: &runtimeapi.ImageSpec{Image: framework.TestContext.TestImageList.DefaultTestContainerImage}, Command: pauseCmd, Linux: &runtimeapi.LinuxContainerConfig{ SecurityContext: &runtimeapi.LinuxContainerSecurityContext{