From eac2edbafa408f64375267fe368588ec34a56fc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Fri, 2 Feb 2024 23:58:52 +0100 Subject: [PATCH] Also change the MIME type in manifest when decompressing a layer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... for purposes of comparison Signed-off-by: Miloslav Trmač --- integration/utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/integration/utils.go b/integration/utils.go index 429f9f6bfb..694223d3e8 100644 --- a/integration/utils.go +++ b/integration/utils.go @@ -269,7 +269,9 @@ func decompressDir(t *testing.T, dir string) { rawLayer["size"] = uncompressedSize var mimeType string getRawMapField(t, rawLayer, "mediaType", &mimeType) - //if strings.HasSuffix(mimeType, ".gzip") … + if strings.HasSuffix(mimeType, ".gzip") { // This should use CutSuffix with Go ≥1.20 + rawLayer["mediaType"] = strings.TrimSuffix(mimeType, ".gzip") + } rawLayers[i] = rawLayer }