Skip to content

Commit 19b621b

Browse files
author
zhouhao
committed
manifestlist_test: fix test
Signed-off-by: zhouhao <[email protected]>
1 parent c16fa01 commit 19b621b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

schema/manifestlist_test.go

+7-8
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func TestManifestList(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
manifestList: `
100100
{
@@ -103,12 +103,15 @@ func TestManifestList(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 TestManifestList(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
}

0 commit comments

Comments
 (0)