Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerd: skip content check with containerd snapshotter #5547

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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