Skip to content

Commit

Permalink
Merge pull request containerd#8359 from kiashok/argsEscapedTestFix
Browse files Browse the repository at this point in the history
Fix argsEscaped tests
  • Loading branch information
kzys authored Apr 14, 2023
2 parents d2b578f + e0b817e commit ffc70c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion integration/images/image_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func initImages(imageListFile string) {
ResourceConsumer: "registry.k8s.io/e2e-test-images/resource-consumer:1.10",
VolumeCopyUp: "ghcr.io/containerd/volume-copy-up:2.1",
VolumeOwnership: "ghcr.io/containerd/volume-ownership:2.1",
ArgsEscaped: "cplatpublic.azurecr.io/args-escaped-test-image-ns:latest",
ArgsEscaped: "cplatpublic.azurecr.io/args-escaped-test-image-ns:1.0",
}

if imageListFile != "" {
Expand Down
2 changes: 1 addition & 1 deletion integration/images/image_list.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ busybox = "docker.io/library/busybox:latest"
pause = "registry.k8s.io/pause:3.7"
VolumeCopyUp = "ghcr.io/containerd/volume-copy-up:2.1"
VolumeOwnership = "ghcr.io/containerd/volume-ownership:2.1"
ArgsEscaped = "cplatpublic.azurecr.io/args-escaped-test-image-ns:latest"
ArgsEscaped = "cplatpublic.azurecr.io/args-escaped-test-image-ns:1.0"
8 changes: 5 additions & 3 deletions integration/windows_hostprocess_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,14 @@ func runHostProcess(t *testing.T, expectErr bool, image string, action hpcAction
action(t, cn, containerConfig)
}

func startAndTestContainer(t *testing.T, sb string, sbConfig *runtime.PodSandboxConfig, cnConfig *runtime.ContainerConfig) {
func runAndRemoveContainer(t *testing.T, sb string, sbConfig *runtime.PodSandboxConfig, cnConfig *runtime.ContainerConfig) {
t.Log("Create the container")
cn, err := runtimeService.CreateContainer(sb, cnConfig, sbConfig)
require.NoError(t, err)
t.Log("Start the container")
require.NoError(t, runtimeService.StartContainer(cn))
// Wait few seconds for the container to be completely initialized
time.Sleep(5 * time.Second)

t.Log("Stop the container")
require.NoError(t, runtimeService.StopContainer(cn, 0))
Expand Down Expand Up @@ -185,6 +187,6 @@ func TestArgsEscapedImagesOnWindows(t *testing.T) {
localSystemUsername,
)

startAndTestContainer(t, sb, sbConfig, cnConfigWithCtrCmd)
startAndTestContainer(t, sb, sbConfig, cnConfigNoCtrCmd)
runAndRemoveContainer(t, sb, sbConfig, cnConfigWithCtrCmd)
runAndRemoveContainer(t, sb, sbConfig, cnConfigNoCtrCmd)
}

0 comments on commit ffc70c4

Please sign in to comment.