From 4ecb587eff5ecd400f671d0c0f2ebdf33227b40b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 13 Apr 2023 12:12:51 +0200 Subject: [PATCH] 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 --- daemon/inspect_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/daemon/inspect_test.go b/daemon/inspect_test.go index e55af45bea..624c5434d1 100644 --- a/daemon/inspect_test.go +++ b/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)