Skip to content

Commit 27ae6c2

Browse files
committed
conformance: make blob mount and upload checks more strict
Signed-off-by: Jason Hall <jason@chainguard.dev>
1 parent 535a845 commit 27ae6c2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

conformance/02_push_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ var test02Push = func() {
277277
Equal(http.StatusCreated),
278278
Equal(http.StatusAccepted),
279279
))
280-
Expect(resp.GetRelativeLocation()).To(ContainSubstring(crossmountNamespace))
280+
Expect(resp.GetRelativeLocation()).To(Equal(fmt.Sprintf("/v2/%s/blobs/%s", crossmountNamespace, testBlobADigest)))
281281

282282
lastResponse = resp
283283
})
@@ -296,8 +296,7 @@ var test02Push = func() {
296296
SkipIfDisabled(push)
297297
RunOnlyIf(lastResponse.StatusCode() == http.StatusAccepted)
298298

299-
loc := lastResponse.GetRelativeLocation()
300-
Expect(loc).To(ContainSubstring("/blobs/uploads/"))
299+
Expect(lastResponse.GetRelativeLocation()).To(HavePrefix(fmt.Sprintf("/v2/%s/blobs/uploads/", crossmountNamespace)))
301300
})
302301

303302
g.Specify("Cross-mounting without from, and automatic content discovery enabled should return a 201", func() {

0 commit comments

Comments
 (0)