Skip to content

Commit 8b904e9

Browse files
authored
Merge pull request #1568 from mtrmac/resolved-workaround
Resolved workaround
2 parents b46506c + 2318307 commit 8b904e9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

integration/copy_test.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,8 +1305,10 @@ func (s *SkopeoSuite) TestFailureCopySrcWithMirrorsUnavailable(c *check.C) {
13051305
dir, err := ioutil.TempDir("", "copy-mirror")
13061306
c.Assert(err, check.IsNil)
13071307

1308-
assertSkopeoFails(c, ".*no such host.*", "--registries-conf="+regConfFixture, "copy",
1309-
"docker://invalid.invalid/busybox", "dir:"+dir)
1308+
// .invalid domains are, per RFC 6761, supposed to result in NXDOMAIN.
1309+
// With systemd-resolved (used only via NSS?), we instead seem to get “Temporary failure in name resolution”
1310+
assertSkopeoFails(c, ".*(no such host|Temporary failure in name resolution).*",
1311+
"--registries-conf="+regConfFixture, "copy", "docker://invalid.invalid/busybox", "dir:"+dir)
13101312
}
13111313

13121314
func (s *SkopeoSuite) TestSuccessCopySrcWithMirrorAndPrefix(c *check.C) {
@@ -1321,8 +1323,10 @@ func (s *SkopeoSuite) TestFailureCopySrcWithMirrorAndPrefixUnavailable(c *check.
13211323
dir, err := ioutil.TempDir("", "copy-mirror")
13221324
c.Assert(err, check.IsNil)
13231325

1324-
assertSkopeoFails(c, ".*no such host.*", "--registries-conf="+regConfFixture, "copy",
1325-
"docker://gcr.invalid/wrong/prefix/busybox", "dir:"+dir)
1326+
// .invalid domains are, per RFC 6761, supposed to result in NXDOMAIN.
1327+
// With systemd-resolved (used only via NSS?), we instead seem to get “Temporary failure in name resolution”
1328+
assertSkopeoFails(c, ".*(no such host|Temporary failure in name resolution).*",
1329+
"--registries-conf="+regConfFixture, "copy", "docker://gcr.invalid/wrong/prefix/busybox", "dir:"+dir)
13261330
}
13271331

13281332
func (s *CopySuite) TestCopyFailsWhenReferenceIsInvalid(c *check.C) {

0 commit comments

Comments
 (0)