chore(deps): update Docker to v28.2.2 and fix compatibility issues (#9037)

This commit is contained in:
Teppei Fukuda
2025-06-19 11:44:06 +04:00
committed by GitHub
parent f23d2f66c1
commit 3f41ffa5b8
12 changed files with 86 additions and 78 deletions

View File

@@ -278,7 +278,10 @@ func TestDockerEngine(t *testing.T) {
}
if tt.maxImageSize != "" {
osArgs = append(osArgs, []string{"--max-image-size", tt.maxImageSize}...)
osArgs = append(osArgs, []string{
"--max-image-size",
tt.maxImageSize,
}...)
}
osArgs = append(osArgs, tt.input)
@@ -286,12 +289,8 @@ func TestDockerEngine(t *testing.T) {
// Run Trivy
runTest(t, osArgs, tt.golden, "", types.FormatJSON, runOptions{
wantErr: tt.wantErr,
// Container field was removed in Docker Engine v26.0
// cf. https://github.com/docker/cli/blob/v26.1.3/docs/deprecated.md#container-and-containerconfig-fields-in-image-inspect
override: overrideFuncs(overrideUID, func(t *testing.T, want, got *types.Report) {
got.Metadata.ImageConfig.Container = ""
want.Metadata.ImageConfig.Container = ""
}),
// Image config fields were removed
override: overrideFuncs(overrideUID, overrideDockerRemovedFields),
})
})
}