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>
This commit is contained in:
Sebastiaan van Stijn 2023-04-13 12:12:51 +02:00
parent a82c434447
commit 4ecb587eff
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -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)