Skip to content

Commit

Permalink
dockerd: skip content check with containerd snapshotter
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Nov 22, 2024
1 parent db6989a commit 0145090
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
18 changes: 10 additions & 8 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7845,14 +7845,16 @@ loop0:
cdAddress := sb.ContainerdAddress()
if cdAddress == "" {
if checkContent {
store := proxy.NewContentStore(c.ContentClient())
count := 0
err := store.Walk(sb.Context(), func(info content.Info) error {
count++
return nil
})
require.NoError(t, err)
require.Equal(t, 0, count)
if err := workers.HasFeatureCompat(t, sb, workers.FeatureContentCheck); err == nil {
store := proxy.NewContentStore(c.ContentClient())
count := 0
err := store.Walk(sb.Context(), func(info content.Info) error {
count++
return nil
})
require.NoError(t, err)
require.Equal(t, 0, count)
}
}
t.Logf("checkAllReleasable: skipping check for exported tars in non-containerd test")
return
Expand Down
1 change: 1 addition & 0 deletions util/testutil/workers/dockerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func InitDockerdWorker() {
Unsupported: []string{
FeatureSecurityMode,
FeatureCNINetwork,
FeatureContentCheck,
},
})
}
Expand Down
2 changes: 2 additions & 0 deletions util/testutil/workers/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const (
FeatureSecurityMode = "security_mode"
FeatureSourceDateEpoch = "source_date_epoch"
FeatureCNINetwork = "cni_network"
FeatureContentCheck = "content_check"
)

var features = map[string]struct{}{
Expand All @@ -56,6 +57,7 @@ var features = map[string]struct{}{
FeatureSecurityMode: {},
FeatureSourceDateEpoch: {},
FeatureCNINetwork: {},
FeatureContentCheck: {},
}

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

0 comments on commit 0145090

Please sign in to comment.