Browse code

c8d/integration/TestBuildOnBuildCache skip parent check

Parent is a graph-driver only field which is stored in the ImageStore.
It's not available when using containerd snapshotters.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>

Paweł Gronowski authored on 2023/08/23 17:55:26
Showing 1 changed files
... ...
@@ -303,9 +303,13 @@ func (s *DockerAPISuite) TestBuildOnBuildCache(c *testing.T) {
303 303
 	client := testEnv.APIClient()
304 304
 
305 305
 	// check parentID is correct
306
-	image, _, err := client.ImageInspectWithRaw(context.Background(), childID)
307
-	assert.NilError(c, err)
308
-	assert.Check(c, is.Equal(parentID, image.Parent))
306
+	// Parent is graphdriver-only
307
+	if !testEnv.UsingSnapshotter() {
308
+		image, _, err := client.ImageInspectWithRaw(context.Background(), childID)
309
+		assert.NilError(c, err)
310
+
311
+		assert.Check(c, is.Equal(parentID, image.Parent))
312
+	}
309 313
 }
310 314
 
311 315
 func (s *DockerRegistrySuite) TestBuildCopyFromForcePull(c *testing.T) {