|
@@ -315,20 +315,6 @@ func (s *DockerTrustSuite) TestTrustedPushWithEnvPasswords(c *check.C) {
|
|
|
c.Assert(string(out), checker.Contains, "Status: Downloaded", check.Commentf(out))
|
|
|
}
|
|
|
|
|
|
-// This test ensures backwards compatibility with old ENV variables. Should be
|
|
|
-// deprecated by 1.10
|
|
|
-func (s *DockerTrustSuite) TestTrustedPushWithDeprecatedEnvPasswords(c *check.C) {
|
|
|
- repoName := fmt.Sprintf("%v/dockercli/trusteddeprecated:latest", privateRegistryURL)
|
|
|
- // tag the image and upload it to the private registry
|
|
|
- dockerCmd(c, "tag", "busybox", repoName)
|
|
|
-
|
|
|
- pushCmd := exec.Command(dockerBinary, "push", repoName)
|
|
|
- s.trustedCmdWithDeprecatedEnvPassphrases(pushCmd, "12345678", "12345678")
|
|
|
- out, _, err := runCommandWithOutput(pushCmd)
|
|
|
- c.Assert(err, check.IsNil, check.Commentf("Error running trusted push: %s\n%s", err, out))
|
|
|
- c.Assert(out, checker.Contains, "Signing and pushing trust metadata", check.Commentf("Missing expected output on trusted push"))
|
|
|
-}
|
|
|
-
|
|
|
func (s *DockerTrustSuite) TestTrustedPushWithFailingServer(c *check.C) {
|
|
|
repoName := fmt.Sprintf("%v/dockerclitrusted/failingserver:latest", privateRegistryURL)
|
|
|
// tag the image and upload it to the private registry
|
|
@@ -423,28 +409,6 @@ func (s *DockerTrustSuite) TestTrustedPushWithIncorrectPassphraseForNonRoot(c *c
|
|
|
c.Assert(out, checker.Contains, "could not find necessary signing keys", check.Commentf("Missing expected output on trusted push with short targets/snapsnot passphrase"))
|
|
|
}
|
|
|
|
|
|
-// This test ensures backwards compatibility with old ENV variables. Should be
|
|
|
-// deprecated by 1.10
|
|
|
-func (s *DockerTrustSuite) TestTrustedPushWithIncorrectDeprecatedPassphraseForNonRoot(c *check.C) {
|
|
|
- repoName := fmt.Sprintf("%v/dockercliincorretdeprecatedpwd/trusted:latest", privateRegistryURL)
|
|
|
- // tag the image and upload it to the private registry
|
|
|
- dockerCmd(c, "tag", "busybox", repoName)
|
|
|
-
|
|
|
- // Push with default passphrases
|
|
|
- pushCmd := exec.Command(dockerBinary, "push", repoName)
|
|
|
- s.trustedCmd(pushCmd)
|
|
|
- out, _, err := runCommandWithOutput(pushCmd)
|
|
|
- c.Assert(err, check.IsNil, check.Commentf("trusted push failed: %s\n%s", err, out))
|
|
|
- c.Assert(out, checker.Contains, "Signing and pushing trust metadata", check.Commentf("Missing expected output on trusted push"))
|
|
|
-
|
|
|
- // Push with wrong passphrases
|
|
|
- pushCmd = exec.Command(dockerBinary, "push", repoName)
|
|
|
- s.trustedCmdWithDeprecatedEnvPassphrases(pushCmd, "12345678", "87654321")
|
|
|
- out, _, err = runCommandWithOutput(pushCmd)
|
|
|
- c.Assert(err, check.NotNil, check.Commentf("Error missing from trusted push with short targets passphrase: \n%s", out))
|
|
|
- c.Assert(out, checker.Contains, "could not find necessary signing keys", check.Commentf("Missing expected output on trusted push with short targets/snapsnot passphrase"))
|
|
|
-}
|
|
|
-
|
|
|
func (s *DockerTrustSuite) TestTrustedPushWithExpiredSnapshot(c *check.C) {
|
|
|
c.Skip("Currently changes system time, causing instability")
|
|
|
repoName := fmt.Sprintf("%v/dockercliexpiredsnapshot/trusted:latest", privateRegistryURL)
|