Skip to content

Commit 0145090

Browse files
committed
dockerd: skip content check with containerd snapshotter
Signed-off-by: CrazyMax <[email protected]>
1 parent db6989a commit 0145090

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

client/client_test.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7845,14 +7845,16 @@ loop0:
78457845
cdAddress := sb.ContainerdAddress()
78467846
if cdAddress == "" {
78477847
if checkContent {
7848-
store := proxy.NewContentStore(c.ContentClient())
7849-
count := 0
7850-
err := store.Walk(sb.Context(), func(info content.Info) error {
7851-
count++
7852-
return nil
7853-
})
7854-
require.NoError(t, err)
7855-
require.Equal(t, 0, count)
7848+
if err := workers.HasFeatureCompat(t, sb, workers.FeatureContentCheck); err == nil {
7849+
store := proxy.NewContentStore(c.ContentClient())
7850+
count := 0
7851+
err := store.Walk(sb.Context(), func(info content.Info) error {
7852+
count++
7853+
return nil
7854+
})
7855+
require.NoError(t, err)
7856+
require.Equal(t, 0, count)
7857+
}
78567858
}
78577859
t.Logf("checkAllReleasable: skipping check for exported tars in non-containerd test")
78587860
return

util/testutil/workers/dockerd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func InitDockerdWorker() {
5050
Unsupported: []string{
5151
FeatureSecurityMode,
5252
FeatureCNINetwork,
53+
FeatureContentCheck,
5354
},
5455
})
5556
}

util/testutil/workers/features.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const (
3030
FeatureSecurityMode = "security_mode"
3131
FeatureSourceDateEpoch = "source_date_epoch"
3232
FeatureCNINetwork = "cni_network"
33+
FeatureContentCheck = "content_check"
3334
)
3435

3536
var features = map[string]struct{}{
@@ -56,6 +57,7 @@ var features = map[string]struct{}{
5657
FeatureSecurityMode: {},
5758
FeatureSourceDateEpoch: {},
5859
FeatureCNINetwork: {},
60+
FeatureContentCheck: {},
5961
}
6062

6163
func CheckFeatureCompat(t *testing.T, sb integration.Sandbox, reason ...string) {

0 commit comments

Comments
 (0)