|
@@ -12,7 +12,7 @@ import (
|
|
|
"sync"
|
|
|
|
|
|
"github.com/docker/distribution/reference"
|
|
|
- dcli "github.com/docker/docker/cli"
|
|
|
+ "github.com/docker/docker/cli/flags"
|
|
|
"github.com/docker/docker/integration-cli/checker"
|
|
|
"github.com/docker/docker/integration-cli/cli"
|
|
|
"github.com/docker/docker/integration-cli/cli/build"
|
|
@@ -294,7 +294,7 @@ func (s *DockerTrustSuite) TestTrustedPush(c *check.C) {
|
|
|
})
|
|
|
|
|
|
// Assert that we rotated the snapshot key to the server by checking our local keystore
|
|
|
- contents, err := ioutil.ReadDir(filepath.Join(dcli.ConfigurationDir(), "trust/private/tuf_keys", privateRegistryURL, "dockerclitrusted/pushtest"))
|
|
|
+ contents, err := ioutil.ReadDir(filepath.Join(flags.ConfigurationDir(), "trust/private/tuf_keys", privateRegistryURL, "dockerclitrusted/pushtest"))
|
|
|
c.Assert(err, check.IsNil, check.Commentf("Unable to read local tuf key files"))
|
|
|
// Check that we only have 1 key (targets key)
|
|
|
c.Assert(contents, checker.HasLen, 1)
|
|
@@ -399,7 +399,7 @@ func (s *DockerTrustSuite) TestTrustedPushWithReleasesDelegationOnly(c *check.C)
|
|
|
s.assertTargetNotInRoles(c, repoName, "latest", "targets")
|
|
|
|
|
|
// Try pull after push
|
|
|
- os.RemoveAll(filepath.Join(dcli.ConfigurationDir(), "trust"))
|
|
|
+ os.RemoveAll(filepath.Join(flags.ConfigurationDir(), "trust"))
|
|
|
|
|
|
cli.Docker(cli.Args("pull", targetName), trustedCmd).Assert(c, icmd.Expected{
|
|
|
Out: "Status: Image is up to date",
|
|
@@ -436,7 +436,7 @@ func (s *DockerTrustSuite) TestTrustedPushSignsAllFirstLevelRolesWeHaveKeysFor(c
|
|
|
s.assertTargetNotInRoles(c, repoName, "latest", "targets")
|
|
|
|
|
|
// Try pull after push
|
|
|
- os.RemoveAll(filepath.Join(dcli.ConfigurationDir(), "trust"))
|
|
|
+ os.RemoveAll(filepath.Join(flags.ConfigurationDir(), "trust"))
|
|
|
|
|
|
// pull should fail because none of these are the releases role
|
|
|
cli.Docker(cli.Args("pull", targetName), trustedCmd).Assert(c, icmd.Expected{
|
|
@@ -472,7 +472,7 @@ func (s *DockerTrustSuite) TestTrustedPushSignsForRolesWithKeysAndValidPaths(c *
|
|
|
s.assertTargetNotInRoles(c, repoName, "latest", "targets")
|
|
|
|
|
|
// Try pull after push
|
|
|
- os.RemoveAll(filepath.Join(dcli.ConfigurationDir(), "trust"))
|
|
|
+ os.RemoveAll(filepath.Join(flags.ConfigurationDir(), "trust"))
|
|
|
|
|
|
// pull should fail because none of these are the releases role
|
|
|
cli.Docker(cli.Args("pull", targetName), trustedCmd).Assert(c, icmd.Expected{
|