Skip to content

Commit

Permalink
Add conformance test verifying that cross-repo mount fails "open"
Browse files Browse the repository at this point in the history
In opencontainers#281, we stated
that cross-repo mounts without from should start an upload. This is a
requirement to make it so that clients can adopt the changes in
opencontainers#275 smoothly.

Signed-off-by: Sargun Dhillon <[email protected]>
  • Loading branch information
sargun committed Sep 15, 2021
1 parent 162b5c9 commit 544cc0f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions conformance/02_push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,17 @@ var test02Push = func() {
})

g.Context("Cross-Repository Blob Mount", func() {
g.Specify("Cross-mounting of a blob without the from argument should yield session id", func() {
SkipIfDisabled(push)
req := client.NewRequest(reggie.POST, "/v2/<name>/blobs/uploads/",
reggie.WithName(crossmountNamespace)).
SetQueryParam("mount", dummyDigest)
resp, err := client.Do(req)
Expect(err).To(BeNil())
Expect(resp.StatusCode()).To(Equal(http.StatusAccepted))
Expect(resp.GetRelativeLocation()).To(ContainSubstring(crossmountNamespace))
})

g.Specify("POST request to mount another repository's blob should return 201 or 202", func() {
SkipIfDisabled(push)
req := client.NewRequest(reggie.POST, "/v2/<name>/blobs/uploads/",
Expand Down

0 comments on commit 544cc0f

Please sign in to comment.