Fix API incompatibilities between notary v0.3.0 and v0.4.2:
- some function signatures have changed - use the new ones - re-generate the notary delegation key certs, since notary doesn't allow SHA1 - fix some error message mapping because now if a root rotation fails to validate trusted operations will fail Signed-off-by: cyli <cyli@twistedmatrix.com> Upstream-commit: 0797af39c2abb681a0e291651686872539a9e187 Component: engine
This commit is contained in:
@ -135,14 +135,14 @@ func (s *DockerTrustSuite) TestTrustedPullFromBadTrustServer(c *check.C) {
|
||||
c.Assert(err, check.IsNil, check.Commentf(out))
|
||||
c.Assert(string(out), checker.Contains, "Signing and pushing trust metadata", check.Commentf(out))
|
||||
|
||||
// Now, try pulling with the original client from this new trust server. This should fall back to cached metadata.
|
||||
// Now, try pulling with the original client from this new trust server. This should fail because the new root is invalid.
|
||||
pullCmd = exec.Command(dockerBinary, "pull", repoName)
|
||||
s.trustedCmd(pullCmd)
|
||||
out, _, err = runCommandWithOutput(pullCmd)
|
||||
if err != nil {
|
||||
c.Fatalf("Error falling back to cached trust data: %s\n%s", err, out)
|
||||
if err == nil {
|
||||
c.Fatalf("Continuing with cached data even though it's an invalid root rotation: %s\n%s", err, out)
|
||||
}
|
||||
if !strings.Contains(string(out), "Error while downloading remote metadata, using cached timestamp") {
|
||||
if !strings.Contains(out, "could not rotate trust to a new trusted root") {
|
||||
c.Fatalf("Missing expected output on trusted pull:\n%s", out)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user