mirror of
https://github.com/containers/skopeo.git
synced 2025-05-03 13:36:59 +00:00
Also change the MIME type in manifest when decompressing a layer
... for purposes of comparison Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
812a02af41
commit
8f2a7c65ff
@ -266,6 +266,11 @@ func decompressDir(t *testing.T, dir string) {
|
|||||||
|
|
||||||
rawLayer["digest"] = uncompressedDigest.String()
|
rawLayer["digest"] = uncompressedDigest.String()
|
||||||
rawLayer["size"] = uncompressedSize
|
rawLayer["size"] = uncompressedSize
|
||||||
|
var mimeType string
|
||||||
|
getRawMapField(t, rawLayer, "mediaType", &mimeType)
|
||||||
|
if strings.HasSuffix(mimeType, ".gzip") { // This should use CutSuffix with Go ≥1.20
|
||||||
|
rawLayer["mediaType"] = strings.TrimSuffix(mimeType, ".gzip")
|
||||||
|
}
|
||||||
|
|
||||||
rawLayers[i] = rawLayer
|
rawLayers[i] = rawLayer
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user