Skip to content

Commit

Permalink
Merge pull request #296 from sargun/add-conformance-for-push
Browse files Browse the repository at this point in the history
Add conformance test verifying that cross-repo mount fails "open"
  • Loading branch information
vbatts authored Sep 19, 2021
2 parents dc8c8b4 + 9173aad commit 635cdf7
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.GetAbsoluteLocation()).To(Not(BeEmpty()))
})

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 635cdf7

Please sign in to comment.