فهرست منبع

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 2 سال پیش
والد
کامیت
4ecb587eff
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      daemon/inspect_test.go

+ 4 - 2
daemon/inspect_test.go

@@ -22,9 +22,11 @@ func TestGetInspectData(t *testing.T) {
 		linkIndex:   newLinkIndex(),
 		configStore: &config.Config{},
 	}
-
+	if d.UsesSnapshotter() {
+		t.Skip("does not apply to containerd snapshotters, which don't have RWLayer set")
+	}
 	_, err := d.getInspectData(c)
-	assert.Check(t, is.ErrorContains(err, ""))
+	assert.Check(t, is.ErrorContains(err, "RWLayer of container inspect-me is unexpectedly nil"))
 
 	c.Dead = true
 	_, err = d.getInspectData(c)