Introduce a cli package for test-integration

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2017-03-23 18:35:22 +01:00
parent ad530ffee0
commit 50c4475df6
33 changed files with 572 additions and 414 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/docker/distribution/manifest/manifestlist"
"github.com/docker/distribution/manifest/schema2"
"github.com/docker/docker/integration-cli/checker"
"github.com/docker/docker/integration-cli/cli/build"
icmd "github.com/docker/docker/pkg/testutil/cmd"
"github.com/go-check/check"
"github.com/opencontainers/go-digest"
@@ -65,7 +66,7 @@ func testConcurrentPullWholeRepo(c *check.C) {
repos := []string{}
for _, tag := range []string{"recent", "fresh", "todays"} {
repo := fmt.Sprintf("%v:%v", repoName, tag)
buildImageSuccessfully(c, repo, withDockerfile(fmt.Sprintf(`
buildImageSuccessfully(c, repo, build.WithDockerfile(fmt.Sprintf(`
FROM busybox
ENTRYPOINT ["/bin/echo"]
ENV FOO foo
@@ -153,7 +154,7 @@ func testConcurrentPullMultipleTags(c *check.C) {
repos := []string{}
for _, tag := range []string{"recent", "fresh", "todays"} {
repo := fmt.Sprintf("%v:%v", repoName, tag)
buildImageSuccessfully(c, repo, withDockerfile(fmt.Sprintf(`
buildImageSuccessfully(c, repo, build.WithDockerfile(fmt.Sprintf(`
FROM busybox
ENTRYPOINT ["/bin/echo"]
ENV FOO foo
@@ -207,7 +208,7 @@ func testPullIDStability(c *check.C) {
derivedImage := privateRegistryURL + "/dockercli/id-stability"
baseImage := "busybox"
buildImageSuccessfully(c, derivedImage, withDockerfile(fmt.Sprintf(`
buildImageSuccessfully(c, derivedImage, build.WithDockerfile(fmt.Sprintf(`
FROM %s
ENV derived true
ENV asdf true
@@ -266,7 +267,7 @@ func (s *DockerSchema1RegistrySuite) TestPullIDStability(c *check.C) {
func testPullNoLayers(c *check.C) {
repoName := fmt.Sprintf("%v/dockercli/scratch", privateRegistryURL)
buildImageSuccessfully(c, repoName, withDockerfile(`
buildImageSuccessfully(c, repoName, build.WithDockerfile(`
FROM scratch
ENV foo bar`))
dockerCmd(c, "push", repoName)