Skip to content

Commit 6a6a6f2

Browse files
authored
Merge pull request opencontainers#386 from coolljt0725/use_v1_package
Use specs-go/v1 to reference media type instead of a contant string
2 parents 2453939 + 017b6fe commit 6a6a6f2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

schema/manifest_backwards_compatibility_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ import (
2222
"testing"
2323

2424
"github.com/opencontainers/image-spec/schema"
25+
"github.com/opencontainers/image-spec/specs-go/v1"
2526
)
2627

2728
var compatMap = map[string]string{
28-
"application/vnd.docker.distribution.manifest.list.v2+json": "application/vnd.oci.image.manifest.list.v1+json",
29-
"application/vnd.docker.distribution.manifest.v2+json": "application/vnd.oci.image.manifest.v1+json",
30-
"application/vnd.docker.image.rootfs.diff.tar.gzip": "application/vnd.oci.image.rootfs.tar.gzip",
31-
"application/vnd.docker.container.image.v1+json": "application/vnd.oci.image.config.v1+json",
29+
"application/vnd.docker.distribution.manifest.list.v2+json": v1.MediaTypeImageManifestList,
30+
"application/vnd.docker.distribution.manifest.v2+json": v1.MediaTypeImageManifest,
31+
"application/vnd.docker.image.rootfs.diff.tar.gzip": v1.MediaTypeImageLayer,
32+
"application/vnd.docker.container.image.v1+json": v1.MediaTypeImageConfig,
3233
}
3334

3435
// convertFormats converts Docker v2.2 image format JSON documents to OCI

0 commit comments

Comments
 (0)