Use image lists in client tests

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko
2022-07-25 10:47:00 -07:00
parent db3ecb286b
commit 552d763447
21 changed files with 95 additions and 74 deletions

View File

@@ -19,6 +19,7 @@ package integration
import (
"testing"
"github.com/containerd/containerd/integration/images"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -28,12 +29,12 @@ func TestContainerRestart(t *testing.T) {
t.Logf("Create a pod config and run sandbox container")
sb, sbConfig := PodSandboxConfigWithCleanup(t, "sandbox1", "restart")
EnsureImageExists(t, pauseImage)
EnsureImageExists(t, images.PauseImage)
t.Logf("Create a container config and run container in a pod")
containerConfig := ContainerConfig(
"container1",
pauseImage,
images.PauseImage,
WithTestLabels(),
WithTestAnnotations(),
)
@@ -62,12 +63,12 @@ func TestFailedContainerRestart(t *testing.T) {
t.Logf("Create a pod config and run sandbox container")
sb, sbConfig := PodSandboxConfigWithCleanup(t, "sandbox1", "restart")
EnsureImageExists(t, pauseImage)
EnsureImageExists(t, images.PauseImage)
t.Logf("Create a container config in a pod with a command that fails")
containerConfig := ContainerConfig(
"container1",
pauseImage,
images.PauseImage,
WithCommand("something-that-doesnt-exist"),
WithTestLabels(),
WithTestAnnotations(),
@@ -88,7 +89,7 @@ func TestFailedContainerRestart(t *testing.T) {
containerConfig = ContainerConfig(
"container1",
pauseImage,
images.PauseImage,
WithTestLabels(),
WithTestAnnotations(),
)