Skip to content

Commit

Permalink
conformance: make blob mount and upload checks more strict
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Hall <jason@chainguard.dev>
  • Loading branch information
imjasonh committed Apr 4, 2023
1 parent 535a845 commit 27ae6c2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions conformance/02_push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ var test02Push = func() {
Equal(http.StatusCreated),
Equal(http.StatusAccepted),
))
Expect(resp.GetRelativeLocation()).To(ContainSubstring(crossmountNamespace))
Expect(resp.GetRelativeLocation()).To(Equal(fmt.Sprintf("/v2/%s/blobs/%s", crossmountNamespace, testBlobADigest)))

lastResponse = resp
})
Expand All @@ -296,8 +296,7 @@ var test02Push = func() {
SkipIfDisabled(push)
RunOnlyIf(lastResponse.StatusCode() == http.StatusAccepted)

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

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

0 comments on commit 27ae6c2

Please sign in to comment.