mirror of
https://github.com/containers/podman.git
synced 2025-11-29 09:37:38 +08:00
Merge pull request #27430 from l0rd/fix-wsl-image-cache-mismatch
Fix cache misses when pulling WSL machine image
This commit is contained in:
@@ -24,9 +24,6 @@ func (imf ImageFormat) Kind() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (imf ImageFormat) KindWithCompression() string {
|
func (imf ImageFormat) KindWithCompression() string {
|
||||||
// Tar uses xz; all others use zstd
|
// All image formats are compressed with zstd
|
||||||
if imf == Tar {
|
|
||||||
return "tar.xz"
|
|
||||||
}
|
|
||||||
return fmt.Sprintf("%s.zst", imf.Kind())
|
return fmt.Sprintf("%s.zst", imf.Kind())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ func TestImageFormat_KindWithCompression(t *testing.T) {
|
|||||||
imf: Raw,
|
imf: Raw,
|
||||||
want: "raw.zst",
|
want: "raw.zst",
|
||||||
}, {
|
}, {
|
||||||
name: "tar.xz",
|
name: "tar.zst",
|
||||||
imf: Tar,
|
imf: Tar,
|
||||||
want: "tar.xz",
|
want: "tar.zst",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|||||||
Reference in New Issue
Block a user