Browse code

daemon: skip TestGetInspectData when using containerd snapshotters

This test does not apply when running with snapshotters enabled;

go test -v -run TestGetInspectData .
=== RUN TestGetInspectData
inspect_test.go:27: RWLayer of container inspect-me is unexpectedly nil
--- FAIL: TestGetInspectData (0.00s)
FAIL
FAIL github.com/docker/docker/daemon 0.049s
FAIL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2023/04/13 19:12:51
Showing 1 changed files
... ...
@@ -22,9 +22,11 @@ func TestGetInspectData(t *testing.T) {
22 22
 		linkIndex:   newLinkIndex(),
23 23
 		configStore: &config.Config{},
24 24
 	}
25
-
25
+	if d.UsesSnapshotter() {
26
+		t.Skip("does not apply to containerd snapshotters, which don't have RWLayer set")
27
+	}
26 28
 	_, err := d.getInspectData(c)
27
-	assert.Check(t, is.ErrorContains(err, ""))
29
+	assert.Check(t, is.ErrorContains(err, "RWLayer of container inspect-me is unexpectedly nil"))
28 30
 
29 31
 	c.Dead = true
30 32
 	_, err = d.getInspectData(c)