diff --git a/integration/containerd_image_test.go b/integration/containerd_image_test.go index bba0fe898..2b19242e8 100644 --- a/integration/containerd_image_test.go +++ b/integration/containerd_image_test.go @@ -44,7 +44,7 @@ func TestContainerdImage(t *testing.T) { } t.Logf("pull the image into containerd") - _, err = containerdClient.Pull(ctx, testImage, containerd.WithPullUnpack) + _, err = containerdClient.Pull(ctx, testImage, containerd.WithPullUnpack, containerd.WithPullLabel("foo", "bar")) assert.NoError(t, err) defer func() { // Make sure the image is cleaned up in any case. @@ -121,6 +121,11 @@ func TestContainerdImage(t *testing.T) { assert.NoError(t, err) assert.Equal(t, imgByID.Labels()["io.cri-containerd.image"], "managed") + t.Logf("the image should be labeled") + img, err := containerdClient.GetImage(ctx, testImage) + assert.NoError(t, err) + assert.Equal(t, img.Labels()["foo"], "bar") + t.Logf("should be able to start container with the image") sb, sbConfig := PodSandboxConfigWithCleanup(t, "sandbox", "containerd-image")