Skip to content

Commit

Permalink
[DO NOT MERGE] Modify skopeo tests
Browse files Browse the repository at this point in the history
The oci name changes in containers/image caused the skopeo test to fail

Signed-off-by: umohnani8 <umohnani@redhat.com>
  • Loading branch information
umohnani8 committed Aug 31, 2017
1 parent 5f6b0a0 commit 03ed807
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 55 deletions.
12 changes: 9 additions & 3 deletions integration/copy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,20 @@ func (s *CopySuite) TestCopySimple(c *check.C) {
out := combinedOutputOfCommand(c, "diff", "-urN", dir1, dir2)
c.Assert(out, check.Equals, "")

// docker v2s2 -> OCI image layout
// docker v2s2 -> OCI image layout with image name
// ociDest will be created by oci: if it doesn't exist
// so don't create it here to exercise auto-creation
ociDest := "busybox-latest"
ociDest := "busybox-latest-image"
ociImgName := "busybox"
defer os.RemoveAll(ociDest)
assertSkopeoSucceeds(c, "", "copy", "docker://busybox:latest", "oci:"+ociDest)
assertSkopeoSucceeds(c, "", "copy", "docker://busybox:latest", "oci:"+ociDest+":"+ociImgName)
_, err = os.Stat(ociDest)
c.Assert(err, check.IsNil)

// docker v2s2 -> OCI image layout without image name
ociDest = "busybox-latest-noimage"
defer os.RemoveAll(ociDest)
assertSkopeoFails(c, ".*Error writing manifest: cannot save image with empty image.ref.name.*", "copy", "docker://busybox:latest", "oci:"+ociDest)
}

// Check whether dir: images in dir1 and dir2 are equal, ignoring schema1 signatures.
Expand Down
4 changes: 4 additions & 0 deletions vendor/github.com/containers/image/docker/docker_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions vendor/github.com/containers/image/oci/layout/oci_dest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

113 changes: 69 additions & 44 deletions vendor/github.com/containers/image/oci/layout/oci_transport.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions vendor/github.com/containers/image/vendor.conf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 03ed807

Please sign in to comment.