diff --git a/integration/check_test.go b/integration/check_test.go index 09102af4..7adb06ec 100644 --- a/integration/check_test.go +++ b/integration/check_test.go @@ -87,3 +87,7 @@ func (s *SkopeoSuite) TestNoNeedAuthToPrivateRegistryV2ImageNotFound(c *check.C) wanted = ".*unauthorized: authentication required.*" 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") +} diff --git a/integration/copy_test.go b/integration/copy_test.go index eac12928..29a120b0 100644 --- a/integration/copy_test.go +++ b/integration/copy_test.go @@ -696,3 +696,7 @@ func (s *SkopeoSuite) TestFailureCopySrcWithMirrorAndPrefixUnavailable(c *check. assertSkopeoFails(c, ".*no such host.*", "--registries-conf="+regConfFixture, "copy", "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") +}