File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ func TestImageIndex(t *testing.T) {
9494 fail : true ,
9595 },
9696
97- // expected pass: manifest. platform is optional
97+ // expected failure: in the optional field platform platform.architecture is missing, expected required
9898 {
9999 imageIndex : `
100100{
@@ -103,12 +103,15 @@ func TestImageIndex(t *testing.T) {
103103 {
104104 "mediaType": "application/vnd.oci.image.manifest.v1+json",
105105 "size": 7682,
106- "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270"
106+ "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270",
107+ "platform": {
108+ "os": "linux",
109+ }
107110 }
108111 ]
109112}
110113` ,
111- fail : false ,
114+ fail : true ,
112115 },
113116
114117 // expected failure: invalid referenced manifest media type
@@ -205,11 +208,7 @@ func TestImageIndex(t *testing.T) {
205208 {
206209 "mediaType": "application/vnd.oci.image.manifest.v1+json",
207210 "size": 7143,
208- "digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f",
209- "platform": {
210- "architecture": "ppc64le",
211- "os": "linux"
212- }
211+ "digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f"
213212 }
214213 ]
215214}
You can’t perform that action at this time.
0 commit comments