mirror of
https://github.com/containers/skopeo.git
synced 2025-08-09 02:17:39 +00:00
Add integration test for invalid reference
This change adds a couple of tests to prevent further regression introduced by https://github.com/containers/skopeo/pull/653 Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
This commit is contained in:
parent
8c9e250801
commit
8fb4ab3d92
@ -87,3 +87,7 @@ func (s *SkopeoSuite) TestNoNeedAuthToPrivateRegistryV2ImageNotFound(c *check.C)
|
|||||||
wanted = ".*unauthorized: authentication required.*"
|
wanted = ".*unauthorized: authentication required.*"
|
||||||
c.Assert(string(out), check.Not(check.Matches), "(?s)"+wanted) // (?s) : '.' will also match newlines
|
c.Assert(string(out), check.Not(check.Matches), "(?s)"+wanted) // (?s) : '.' will also match newlines
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *SkopeoSuite) TestInspectFailsWhenReferenceIsInvalid(c *check.C) {
|
||||||
|
assertSkopeoFails(c, `.*Invalid image name.*`, "inspect", "unknown")
|
||||||
|
}
|
||||||
|
@ -696,3 +696,7 @@ func (s *SkopeoSuite) TestFailureCopySrcWithMirrorAndPrefixUnavailable(c *check.
|
|||||||
assertSkopeoFails(c, ".*no such host.*", "--registries-conf="+regConfFixture, "copy",
|
assertSkopeoFails(c, ".*no such host.*", "--registries-conf="+regConfFixture, "copy",
|
||||||
"docker://gcr.invalid/wrong/prefix/busybox", "dir:"+dir)
|
"docker://gcr.invalid/wrong/prefix/busybox", "dir:"+dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *CopySuite) TestCopyFailsWhenReferenceIsInvalid(c *check.C) {
|
||||||
|
assertSkopeoFails(c, `.*Invalid image name.*`, "copy", "unknown:transport", "unknown:test")
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user