MCPcopy
hub / github.com/containerd/containerd / TestContainerdSandboxImage

Function TestContainerdSandboxImage

integration/containerd_image_test.go:220–236  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

218}
219
220func TestContainerdSandboxImage(t *testing.T) {
221 var pauseImage = images.Get(images.Pause)
222 ctx := context.Background()
223
224 t.Log("make sure the pause image exist")
225 pauseImg, err := containerdClient.GetImage(ctx, pauseImage)
226 require.NoError(t, err)
227 t.Log("ensure correct labels are set on pause image")
228 assert.Equal(t, "pinned", pauseImg.Labels()["io.cri-containerd.pinned"])
229
230 t.Log("pause image should be seen by cri plugin")
231 pimg, err := imageService.ImageStatus(&runtime.ImageSpec{Image: pauseImage})
232 require.NoError(t, err)
233 require.NotNil(t, pimg)
234 t.Log("verify pinned field is set for pause image")
235 assert.True(t, pimg.Pinned)
236}
237
238func TestContainerdSandboxImagePulledOutsideCRI(t *testing.T) {
239 var pauseImage = images.Get(images.Pause)

Callers

nothing calls this directly

Calls 5

GetFunction · 0.92
LogMethod · 0.80
GetImageMethod · 0.65
LabelsMethod · 0.65
ImageStatusMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…