Use image lists in client tests
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
@@ -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(),
|
||||
)
|
||||
|
Reference in New Issue
Block a user