Skip to content

Commit 9a5900f

Browse files
committed
schema/descriptor_test: Add test with a valid entry in 'urls'
To mirror the invalid entry added in a2dab39 (descriptor-test: add test, 2017-02-23, #580). Signed-off-by: W. Trevor King <[email protected]>
1 parent 039bc0c commit 9a5900f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

schema/descriptor_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,21 @@ func TestDescriptor(t *testing.T) {
203203
fail: true,
204204
},
205205

206+
// expected success: valid URL entry
207+
{
208+
descriptor: `
209+
{
210+
"mediaType": "application/vnd.oci.image.manifest.v1+json",
211+
"size": 7682,
212+
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270",
213+
"urls": [
214+
"https://example.com/foo"
215+
]
216+
}
217+
`,
218+
fail: false,
219+
},
220+
206221
// expected failure: urls does not match format (invalide url characters)
207222
{
208223
descriptor: `

0 commit comments

Comments
 (0)