|
@@ -321,7 +321,8 @@ func (s *DockerTrustSuite) TestTrustedPushWithFailingServer(c *check.C) {
|
|
dockerCmd(c, "tag", "busybox", repoName)
|
|
dockerCmd(c, "tag", "busybox", repoName)
|
|
|
|
|
|
pushCmd := exec.Command(dockerBinary, "push", repoName)
|
|
pushCmd := exec.Command(dockerBinary, "push", repoName)
|
|
- s.trustedCmdWithServer(pushCmd, "https://example.com:81/")
|
|
|
|
|
|
+ // Using a name that doesn't resolve to an address makes this test faster
|
|
|
|
+ s.trustedCmdWithServer(pushCmd, "https://server.invalid:81/")
|
|
out, _, err := runCommandWithOutput(pushCmd)
|
|
out, _, err := runCommandWithOutput(pushCmd)
|
|
c.Assert(err, check.NotNil, check.Commentf("Missing error while running trusted push w/ no server"))
|
|
c.Assert(err, check.NotNil, check.Commentf("Missing error while running trusted push w/ no server"))
|
|
c.Assert(out, checker.Contains, "error contacting notary server", check.Commentf("Missing expected output on trusted push"))
|
|
c.Assert(out, checker.Contains, "error contacting notary server", check.Commentf("Missing expected output on trusted push"))
|
|
@@ -333,7 +334,8 @@ func (s *DockerTrustSuite) TestTrustedPushWithoutServerAndUntrusted(c *check.C)
|
|
dockerCmd(c, "tag", "busybox", repoName)
|
|
dockerCmd(c, "tag", "busybox", repoName)
|
|
|
|
|
|
pushCmd := exec.Command(dockerBinary, "push", "--disable-content-trust", repoName)
|
|
pushCmd := exec.Command(dockerBinary, "push", "--disable-content-trust", repoName)
|
|
- s.trustedCmdWithServer(pushCmd, "https://example.com/")
|
|
|
|
|
|
+ // Using a name that doesn't resolve to an address makes this test faster
|
|
|
|
+ s.trustedCmdWithServer(pushCmd, "https://server.invalid")
|
|
out, _, err := runCommandWithOutput(pushCmd)
|
|
out, _, err := runCommandWithOutput(pushCmd)
|
|
c.Assert(err, check.IsNil, check.Commentf("trusted push with no server and --disable-content-trust failed: %s\n%s", err, out))
|
|
c.Assert(err, check.IsNil, check.Commentf("trusted push with no server and --disable-content-trust failed: %s\n%s", err, out))
|
|
c.Assert(out, check.Not(checker.Contains), "Error establishing connection to notary repository", check.Commentf("Missing expected output on trusted push with --disable-content-trust:"))
|
|
c.Assert(out, check.Not(checker.Contains), "Error establishing connection to notary repository", check.Commentf("Missing expected output on trusted push with --disable-content-trust:"))
|