From 10abb9454f9c30163767df18e5292f3903d7e63f Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Wed, 11 Apr 2018 00:42:03 +0000 Subject: [PATCH 1/9] Migrate image tag tests from integration-cli to api tests This fix migrates image tag tests from integration-cli to api tests. Signed-off-by: Yong Tang Upstream-commit: 9bcb960508a6066811cffcca1e35ca44d7f1cf94 Component: engine --- .../integration-cli/docker_cli_tag_test.go | 139 ------------------ .../engine/integration/image/tag_test.go | 139 ++++++++++++++++++ 2 files changed, 139 insertions(+), 139 deletions(-) delete mode 100644 components/engine/integration-cli/docker_cli_tag_test.go create mode 100644 components/engine/integration/image/tag_test.go diff --git a/components/engine/integration-cli/docker_cli_tag_test.go b/components/engine/integration-cli/docker_cli_tag_test.go deleted file mode 100644 index 278e348f4e..0000000000 --- a/components/engine/integration-cli/docker_cli_tag_test.go +++ /dev/null @@ -1,139 +0,0 @@ -package main - -import ( - "strings" - - "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/internal/testutil" - "github.com/go-check/check" -) - -// tagging a named image in a new unprefixed repo should work -func (s *DockerSuite) TestTagUnprefixedRepoByName(c *check.C) { - dockerCmd(c, "tag", "busybox:latest", "testfoobarbaz") -} - -// tagging an image by ID in a new unprefixed repo should work -func (s *DockerSuite) TestTagUnprefixedRepoByID(c *check.C) { - imageID := inspectField(c, "busybox", "Id") - dockerCmd(c, "tag", imageID, "testfoobarbaz") -} - -// ensure we don't allow the use of invalid repository names; these tag operations should fail -func (s *DockerSuite) TestTagInvalidUnprefixedRepo(c *check.C) { - invalidRepos := []string{"fo$z$", "Foo@3cc", "Foo$3", "Foo*3", "Fo^3", "Foo!3", "F)xcz(", "fo%asd", "FOO/bar"} - - for _, repo := range invalidRepos { - out, _, err := dockerCmdWithError("tag", "busybox", repo) - c.Assert(err, checker.NotNil, check.Commentf("tag busybox %v should have failed : %v", repo, out)) - } -} - -// ensure we don't allow the use of invalid tags; these tag operations should fail -func (s *DockerSuite) TestTagInvalidPrefixedRepo(c *check.C) { - longTag := testutil.GenerateRandomAlphaOnlyString(121) - - invalidTags := []string{"repo:fo$z$", "repo:Foo@3cc", "repo:Foo$3", "repo:Foo*3", "repo:Fo^3", "repo:Foo!3", "repo:%goodbye", "repo:#hashtagit", "repo:F)xcz(", "repo:-foo", "repo:..", longTag} - - for _, repotag := range invalidTags { - out, _, err := dockerCmdWithError("tag", "busybox", repotag) - c.Assert(err, checker.NotNil, check.Commentf("tag busybox %v should have failed : %v", repotag, out)) - } -} - -// ensure we allow the use of valid tags -func (s *DockerSuite) TestTagValidPrefixedRepo(c *check.C) { - validRepos := []string{"fooo/bar", "fooaa/test", "foooo:t", "HOSTNAME.DOMAIN.COM:443/foo/bar"} - - for _, repo := range validRepos { - _, _, err := dockerCmdWithError("tag", "busybox:latest", repo) - if err != nil { - c.Errorf("tag busybox %v should have worked: %s", repo, err) - continue - } - deleteImages(repo) - } -} - -// tag an image with an existed tag name without -f option should work -func (s *DockerSuite) TestTagExistedNameWithoutForce(c *check.C) { - dockerCmd(c, "tag", "busybox:latest", "busybox:test") -} - -func (s *DockerSuite) TestTagWithPrefixHyphen(c *check.C) { - // test repository name begin with '-' - out, _, err := dockerCmdWithError("tag", "busybox:latest", "-busybox:test") - c.Assert(err, checker.NotNil, check.Commentf(out)) - c.Assert(out, checker.Contains, "Error parsing reference", check.Commentf("tag a name begin with '-' should failed")) - - // test namespace name begin with '-' - out, _, err = dockerCmdWithError("tag", "busybox:latest", "-test/busybox:test") - c.Assert(err, checker.NotNil, check.Commentf(out)) - c.Assert(out, checker.Contains, "Error parsing reference", check.Commentf("tag a name begin with '-' should failed")) - - // test index name begin with '-' - out, _, err = dockerCmdWithError("tag", "busybox:latest", "-index:5000/busybox:test") - c.Assert(err, checker.NotNil, check.Commentf(out)) - c.Assert(out, checker.Contains, "Error parsing reference", check.Commentf("tag a name begin with '-' should failed")) -} - -// ensure tagging using official names works -// ensure all tags result in the same name -func (s *DockerSuite) TestTagOfficialNames(c *check.C) { - names := []string{ - "docker.io/busybox", - "index.docker.io/busybox", - "library/busybox", - "docker.io/library/busybox", - "index.docker.io/library/busybox", - } - - for _, name := range names { - out, exitCode, err := dockerCmdWithError("tag", "busybox:latest", name+":latest") - if err != nil || exitCode != 0 { - c.Errorf("tag busybox %v should have worked: %s, %s", name, err, out) - continue - } - - // ensure we don't have multiple tag names. - out, _, err = dockerCmdWithError("images") - if err != nil { - c.Errorf("listing images failed with errors: %v, %s", err, out) - } else if strings.Contains(out, name) { - c.Errorf("images should not have listed '%s'", name) - deleteImages(name + ":latest") - } - } - - for _, name := range names { - _, exitCode, err := dockerCmdWithError("tag", name+":latest", "fooo/bar:latest") - if err != nil || exitCode != 0 { - c.Errorf("tag %v fooo/bar should have worked: %s", name, err) - continue - } - deleteImages("fooo/bar:latest") - } -} - -// ensure tags can not match digests -func (s *DockerSuite) TestTagMatchesDigest(c *check.C) { - digest := "busybox@sha256:abcdef76720241213f5303bda7704ec4c2ef75613173910a56fb1b6e20251507" - // test setting tag fails - _, _, err := dockerCmdWithError("tag", "busybox:latest", digest) - if err == nil { - c.Fatal("digest tag a name should have failed") - } - // check that no new image matches the digest - _, _, err = dockerCmdWithError("inspect", digest) - if err == nil { - c.Fatal("inspecting by digest should have failed") - } -} - -func (s *DockerSuite) TestTagInvalidRepoName(c *check.C) { - // test setting tag fails - _, _, err := dockerCmdWithError("tag", "busybox:latest", "sha256:sometag") - if err == nil { - c.Fatal("tagging with image named \"sha256\" should have failed") - } -} diff --git a/components/engine/integration/image/tag_test.go b/components/engine/integration/image/tag_test.go new file mode 100644 index 0000000000..c396c07c5c --- /dev/null +++ b/components/engine/integration/image/tag_test.go @@ -0,0 +1,139 @@ +package image // import "github.com/docker/docker/integration/image" + +import ( + "context" + "fmt" + "testing" + + "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/testutil" + "github.com/gotestyourself/gotestyourself/assert" + is "github.com/gotestyourself/gotestyourself/assert/cmp" +) + +// tagging a named image in a new unprefixed repo should work +func TestTagUnprefixedRepoByNameOrName(t *testing.T) { + defer setupTest(t)() + client := request.NewAPIClient(t) + ctx := context.Background() + + // By name + err := client.ImageTag(ctx, "busybox:latest", "testfoobarbaz") + assert.NilError(t, err) + + // By ID + insp, _, err := client.ImageInspectWithRaw(ctx, "busybox") + assert.NilError(t, err) + err = client.ImageTag(ctx, insp.ID, "testfoobarbaz") + assert.NilError(t, err) +} + +// ensure we don't allow the use of invalid repository names or tags; these tag operations should fail +// TODO (yongtang): Migrate to unit tests +func TestTagInvalidReference(t *testing.T) { + defer setupTest(t)() + client := request.NewAPIClient(t) + ctx := context.Background() + + invalidRepos := []string{"fo$z$", "Foo@3cc", "Foo$3", "Foo*3", "Fo^3", "Foo!3", "F)xcz(", "fo%asd", "FOO/bar"} + + for _, repo := range invalidRepos { + err := client.ImageTag(ctx, "busybox", repo) + testutil.ErrorContains(t, err, "not a valid repository/tag") + } + + longTag := testutil.GenerateRandomAlphaOnlyString(121) + + invalidTags := []string{"repo:fo$z$", "repo:Foo@3cc", "repo:Foo$3", "repo:Foo*3", "repo:Fo^3", "repo:Foo!3", "repo:%goodbye", "repo:#hashtagit", "repo:F)xcz(", "repo:-foo", "repo:..", longTag} + + for _, repotag := range invalidTags { + err := client.ImageTag(ctx, "busybox", repotag) + testutil.ErrorContains(t, err, "not a valid repository/tag") + } + + // test repository name begin with '-' + err := client.ImageTag(ctx, "busybox:latest", "-busybox:test") + testutil.ErrorContains(t, err, "Error parsing reference") + + // test namespace name begin with '-' + err = client.ImageTag(ctx, "busybox:latest", "-test/busybox:test") + testutil.ErrorContains(t, err, "Error parsing reference") + + // test index name begin with '-' + err = client.ImageTag(ctx, "busybox:latest", "-index:5000/busybox:test") + testutil.ErrorContains(t, err, "Error parsing reference") + + // test setting tag fails + err = client.ImageTag(ctx, "busybox:latest", "sha256:sometag") + testutil.ErrorContains(t, err, "refusing to create an ambiguous tag using digest algorithm as name") +} + +// ensure we allow the use of valid tags +func TestTagValidPrefixedRepo(t *testing.T) { + defer setupTest(t)() + client := request.NewAPIClient(t) + ctx := context.Background() + + validRepos := []string{"fooo/bar", "fooaa/test", "foooo:t", "HOSTNAME.DOMAIN.COM:443/foo/bar"} + + for _, repo := range validRepos { + err := client.ImageTag(ctx, "busybox", repo) + assert.NilError(t, err) + } +} + +// tag an image with an existed tag name without -f option should work +func TestTagExistedNameWithoutForce(t *testing.T) { + defer setupTest(t)() + client := request.NewAPIClient(t) + ctx := context.Background() + + err := client.ImageTag(ctx, "busybox:latest", "busybox:test") + assert.NilError(t, err) +} + +// ensure tagging using official names works +// ensure all tags result in the same name +func TestTagOfficialNames(t *testing.T) { + defer setupTest(t)() + client := request.NewAPIClient(t) + ctx := context.Background() + + names := []string{ + "docker.io/busybox", + "index.docker.io/busybox", + "library/busybox", + "docker.io/library/busybox", + "index.docker.io/library/busybox", + } + + for _, name := range names { + err := client.ImageTag(ctx, "busybox", name+":latest") + assert.NilError(t, err) + + // ensure we don't have multiple tag names. + insp, _, err := client.ImageInspectWithRaw(ctx, "busybox") + assert.NilError(t, err) + assert.Assert(t, !is.Contains(insp.RepoTags, name)().Success()) + } + + for _, name := range names { + err := client.ImageTag(ctx, name+":latest", "fooo/bar:latest") + assert.NilError(t, err) + } +} + +// ensure tags can not match digests +func TestTagMatchesDigest(t *testing.T) { + defer setupTest(t)() + client := request.NewAPIClient(t) + ctx := context.Background() + + digest := "busybox@sha256:abcdef76720241213f5303bda7704ec4c2ef75613173910a56fb1b6e20251507" + // test setting tag fails + err := client.ImageTag(ctx, "busybox:latest", digest) + testutil.ErrorContains(t, err, "refusing to create a tag with a digest reference") + // check that no new image matches the digest + _, _, err = client.ImageInspectWithRaw(ctx, digest) + testutil.ErrorContains(t, err, fmt.Sprintf("No such image: %s", digest)) +} From bd6e2995837ac787a67e169cf3bfb8e24952f93b Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Fri, 13 Apr 2018 17:02:56 +0200 Subject: [PATCH 2/9] Small daemon refactoring and add swarm init/join helpers Signed-off-by: Vincent Demeester Upstream-commit: 239a8a518904dfb51fe62087d8702519c20ce808 Component: engine --- .../engine/integration-cli/check_test.go | 45 ++++++------------- .../engine/integration-cli/daemon/daemon.go | 11 +---- .../integration-cli/docker_cli_daemon_test.go | 23 +++------- ...cker_cli_external_graphdriver_unix_test.go | 5 +-- ...er_cli_external_volume_driver_unix_test.go | 5 +-- .../integration-cli/docker_cli_info_test.go | 21 +++------ .../docker_cli_network_unix_test.go | 5 +-- .../docker_cli_plugins_test.go | 2 +- .../docker_hub_pull_suite_test.go | 5 +-- .../integration/build/build_session_test.go | 6 +-- .../integration/build/build_squash_test.go | 6 +-- .../engine/integration/config/config_test.go | 20 ++++----- .../integration/internal/swarm/service.go | 23 +++------- .../integration/network/inspect_test.go | 4 +- .../integration/network/ipvlan/ipvlan_test.go | 10 ++--- .../integration/network/service_test.go | 9 ++-- .../engine/integration/secret/secret_test.go | 26 +++++------ .../engine/integration/service/create_test.go | 16 +++---- .../integration/service/inspect_test.go | 4 +- .../integration/service/network_test.go | 7 ++- components/engine/internal/test/daemon/ops.go | 11 +++++ .../engine/internal/test/daemon/service.go | 6 +-- .../engine/internal/test/daemon/swarm.go | 26 +++++++++++ 23 files changed, 129 insertions(+), 167 deletions(-) diff --git a/components/engine/integration-cli/check_test.go b/components/engine/integration-cli/check_test.go index 6bab50f907..e98a5be4e0 100644 --- a/components/engine/integration-cli/check_test.go +++ b/components/engine/integration-cli/check_test.go @@ -13,7 +13,6 @@ import ( "testing" "time" - "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build/fakestorage" @@ -129,9 +128,7 @@ func (s *DockerRegistrySuite) SetUpTest(c *check.C) { testRequires(c, DaemonIsLinux, RegistryHosting, SameHostDaemon) s.reg = registry.NewV2(c) s.reg.WaitReady(c) - s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + s.d = daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) } func (s *DockerRegistrySuite) TearDownTest(c *check.C) { @@ -164,9 +161,7 @@ func (s *DockerSchema1RegistrySuite) SetUpTest(c *check.C) { testRequires(c, DaemonIsLinux, RegistryHosting, NotArm64, SameHostDaemon) s.reg = registry.NewV2(c, registry.Schema1) s.reg.WaitReady(c) - s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + s.d = daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) } func (s *DockerSchema1RegistrySuite) TearDownTest(c *check.C) { @@ -199,9 +194,7 @@ func (s *DockerRegistryAuthHtpasswdSuite) SetUpTest(c *check.C) { testRequires(c, DaemonIsLinux, RegistryHosting, SameHostDaemon) s.reg = registry.NewV2(c, registry.Htpasswd) s.reg.WaitReady(c) - s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + s.d = daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) } func (s *DockerRegistryAuthHtpasswdSuite) TearDownTest(c *check.C) { @@ -234,9 +227,7 @@ func (s *DockerRegistryAuthTokenSuite) OnTimeout(c *check.C) { func (s *DockerRegistryAuthTokenSuite) SetUpTest(c *check.C) { testRequires(c, DaemonIsLinux, RegistryHosting, SameHostDaemon) - s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + s.d = daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) } func (s *DockerRegistryAuthTokenSuite) TearDownTest(c *check.C) { @@ -276,9 +267,7 @@ func (s *DockerDaemonSuite) OnTimeout(c *check.C) { func (s *DockerDaemonSuite) SetUpTest(c *check.C) { testRequires(c, DaemonIsLinux, SameHostDaemon) - s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + s.d = daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) } func (s *DockerDaemonSuite) TearDownTest(c *check.C) { @@ -333,26 +322,18 @@ func (s *DockerSwarmSuite) SetUpTest(c *check.C) { } func (s *DockerSwarmSuite) AddDaemon(c *check.C, joinSwarm, manager bool) *daemon.Daemon { - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }, testdaemon.WithSwarmPort(defaultSwarmPort+s.portIndex)) - args := []string{"--iptables=false", "--swarm-default-advertise-addr=lo"} // avoid networking conflicts - d.StartWithBusybox(c, args...) - + d := daemon.New(c, dockerBinary, dockerdBinary, + testdaemon.WithEnvironment(testEnv.Execution), + testdaemon.WithSwarmPort(defaultSwarmPort+s.portIndex), + ) if joinSwarm { if len(s.daemons) > 0 { - tokens := s.daemons[0].JoinTokens(c) - token := tokens.Worker - if manager { - token = tokens.Manager - } - d.SwarmJoin(c, swarm.JoinRequest{ - RemoteAddrs: []string{s.daemons[0].SwarmListenAddr()}, - JoinToken: token, - }) + d.StartAndSwarmJoin(c, s.daemons[0].Daemon, manager) } else { - d.SwarmInit(c, swarm.InitRequest{}) + d.StartAndSwarmInit(c) } + } else { + d.StartWithBusybox(c, "--iptables=false", "--swarm-default-advertise-addr=lo") } s.portIndex++ diff --git a/components/engine/integration-cli/daemon/daemon.go b/components/engine/integration-cli/daemon/daemon.go index 0ec9e892b2..3087416ee0 100644 --- a/components/engine/integration-cli/daemon/daemon.go +++ b/components/engine/integration-cli/daemon/daemon.go @@ -30,21 +30,12 @@ type Daemon struct { dockerBinary string } -// Config holds docker daemon integration configuration -type Config struct { - Experimental bool -} - // New returns a Daemon instance to be used for testing. // This will create a directory such as d123456789 in the folder specified by $DOCKER_INTEGRATION_DAEMON_DEST or $DEST. // The daemon will not automatically start. -func New(t testingT, dockerBinary string, dockerdBinary string, config Config, ops ...func(*daemon.Daemon)) *Daemon { +func New(t testingT, dockerBinary string, dockerdBinary string, ops ...func(*daemon.Daemon)) *Daemon { ops = append(ops, daemon.WithDockerdBinary(dockerdBinary)) - if config.Experimental { - ops = append(ops, daemon.WithExperimental) - } d := daemon.New(t, ops...) - return &Daemon{ Daemon: d, dockerBinary: dockerBinary, diff --git a/components/engine/integration-cli/docker_cli_daemon_test.go b/components/engine/integration-cli/docker_cli_daemon_test.go index 2646de3fb7..975f06d2b4 100644 --- a/components/engine/integration-cli/docker_cli_daemon_test.go +++ b/components/engine/integration-cli/docker_cli_daemon_test.go @@ -32,6 +32,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/daemon" + testdaemon "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/opts" "github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/stringid" @@ -1432,9 +1433,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithSocketAsVolume(c *check.C) { // os.Kill should kill daemon ungracefully, leaving behind container mounts. // A subsequent daemon restart should clean up said mounts. func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonAndContainerKill(c *check.C) { - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) d.StartWithBusybox(c) out, err := d.Cmd("run", "-d", "busybox", "top") @@ -1472,9 +1471,7 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonAndContainerKill(c *chec // os.Interrupt should perform a graceful daemon shutdown and hence cleanup mounts. func (s *DockerDaemonSuite) TestCleanupMountsAfterGracefulShutdown(c *check.C) { - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) d.StartWithBusybox(c) out, err := d.Cmd("run", "-d", "busybox", "top") @@ -1693,9 +1690,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartLocalVolumes(c *check.C) { // FIXME(vdemeester) should be a unit test func (s *DockerDaemonSuite) TestDaemonCorruptedLogDriverAddress(c *check.C) { - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) c.Assert(d.StartWithError("--log-driver=syslog", "--log-opt", "syslog-address=corrupted:42"), check.NotNil) expected := "syslog-address should be in form proto://address" icmd.RunCommand("grep", expected, d.LogFileName()).Assert(c, icmd.Success) @@ -1703,9 +1698,7 @@ func (s *DockerDaemonSuite) TestDaemonCorruptedLogDriverAddress(c *check.C) { // FIXME(vdemeester) should be a unit test func (s *DockerDaemonSuite) TestDaemonCorruptedFluentdAddress(c *check.C) { - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) c.Assert(d.StartWithError("--log-driver=fluentd", "--log-opt", "fluentd-address=corrupted:c"), check.NotNil) expected := "invalid fluentd-address corrupted:c: " icmd.RunCommand("grep", expected, d.LogFileName()).Assert(c, icmd.Success) @@ -3080,9 +3073,7 @@ func (s *DockerDaemonSuite) TestDaemonIpcModeShareableFromConfig(c *check.C) { } func testDaemonStartIpcMode(c *check.C, from, mode string, valid bool) { - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) c.Logf("Checking IpcMode %s set from %s\n", mode, from) var serr error switch from { @@ -3183,7 +3174,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartIpcMode(c *check.C) { // the daemon from starting func (s *DockerDaemonSuite) TestFailedPluginRemove(c *check.C) { testRequires(c, DaemonIsLinux, IsAmd64, SameHostDaemon) - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{}) + d := daemon.New(c, dockerBinary, dockerdBinary) d.Start(c) cli, err := client.NewClient(d.Sock(), api.DefaultVersion, nil, nil) c.Assert(err, checker.IsNil) diff --git a/components/engine/integration-cli/docker_cli_external_graphdriver_unix_test.go b/components/engine/integration-cli/docker_cli_external_graphdriver_unix_test.go index e356154049..a52e58b2d2 100644 --- a/components/engine/integration-cli/docker_cli_external_graphdriver_unix_test.go +++ b/components/engine/integration-cli/docker_cli_external_graphdriver_unix_test.go @@ -15,6 +15,7 @@ import ( "github.com/docker/docker/daemon/graphdriver" "github.com/docker/docker/daemon/graphdriver/vfs" "github.com/docker/docker/integration-cli/daemon" + testdaemon "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/plugins" "github.com/go-check/check" @@ -52,9 +53,7 @@ type graphEventsCounter struct { } func (s *DockerExternalGraphdriverSuite) SetUpTest(c *check.C) { - s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + s.d = daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) } func (s *DockerExternalGraphdriverSuite) OnTimeout(c *check.C) { diff --git a/components/engine/integration-cli/docker_cli_external_volume_driver_unix_test.go b/components/engine/integration-cli/docker_cli_external_volume_driver_unix_test.go index ff3d50fb03..1553abda28 100644 --- a/components/engine/integration-cli/docker_cli_external_volume_driver_unix_test.go +++ b/components/engine/integration-cli/docker_cli_external_volume_driver_unix_test.go @@ -18,6 +18,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/daemon" + testdaemon "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/volume" "github.com/go-check/check" @@ -51,9 +52,7 @@ type DockerExternalVolumeSuite struct { func (s *DockerExternalVolumeSuite) SetUpTest(c *check.C) { testRequires(c, SameHostDaemon) - s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + s.d = daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) s.ec = &eventCounter{} } diff --git a/components/engine/integration-cli/docker_cli_info_test.go b/components/engine/integration-cli/docker_cli_info_test.go index 35a2532196..65091029ee 100644 --- a/components/engine/integration-cli/docker_cli_info_test.go +++ b/components/engine/integration-cli/docker_cli_info_test.go @@ -8,6 +8,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/daemon" + testdaemon "github.com/docker/docker/internal/test/daemon" "github.com/go-check/check" ) @@ -71,9 +72,7 @@ func (s *DockerSuite) TestInfoFormat(c *check.C) { func (s *DockerSuite) TestInfoDiscoveryBackend(c *check.C) { testRequires(c, SameHostDaemon, DaemonIsLinux) - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) discoveryBackend := "consul://consuladdr:consulport/some/path" discoveryAdvertise := "1.1.1.1:2375" d.Start(c, fmt.Sprintf("--cluster-store=%s", discoveryBackend), fmt.Sprintf("--cluster-advertise=%s", discoveryAdvertise)) @@ -90,9 +89,7 @@ func (s *DockerSuite) TestInfoDiscoveryBackend(c *check.C) { func (s *DockerSuite) TestInfoDiscoveryInvalidAdvertise(c *check.C) { testRequires(c, SameHostDaemon, DaemonIsLinux) - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) discoveryBackend := "consul://consuladdr:consulport/some/path" // --cluster-advertise with an invalid string is an error @@ -109,9 +106,7 @@ func (s *DockerSuite) TestInfoDiscoveryInvalidAdvertise(c *check.C) { func (s *DockerSuite) TestInfoDiscoveryAdvertiseInterfaceName(c *check.C) { testRequires(c, SameHostDaemon, Network, DaemonIsLinux) - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) discoveryBackend := "consul://consuladdr:consulport/some/path" discoveryAdvertise := "eth0" @@ -182,9 +177,7 @@ func (s *DockerSuite) TestInfoDisplaysStoppedContainers(c *check.C) { func (s *DockerSuite) TestInfoDebug(c *check.C) { testRequires(c, SameHostDaemon, DaemonIsLinux) - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) d.Start(c, "--debug") defer d.Stop(c) @@ -205,9 +198,7 @@ func (s *DockerSuite) TestInsecureRegistries(c *check.C) { registryCIDR := "192.168.1.0/24" registryHost := "insecurehost.com:5000" - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) d.Start(c, "--insecure-registry="+registryCIDR, "--insecure-registry="+registryHost) defer d.Stop(c) diff --git a/components/engine/integration-cli/docker_cli_network_unix_test.go b/components/engine/integration-cli/docker_cli_network_unix_test.go index bd3cf54342..f3ecd62187 100644 --- a/components/engine/integration-cli/docker_cli_network_unix_test.go +++ b/components/engine/integration-cli/docker_cli_network_unix_test.go @@ -18,6 +18,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/daemon" + testdaemon "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/runconfig" "github.com/docker/libnetwork/driverapi" @@ -49,9 +50,7 @@ type DockerNetworkSuite struct { } func (s *DockerNetworkSuite) SetUpTest(c *check.C) { - s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + s.d = daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) } func (s *DockerNetworkSuite) TearDownTest(c *check.C) { diff --git a/components/engine/integration-cli/docker_cli_plugins_test.go b/components/engine/integration-cli/docker_cli_plugins_test.go index 8a936e3e44..c773fec5d5 100644 --- a/components/engine/integration-cli/docker_cli_plugins_test.go +++ b/components/engine/integration-cli/docker_cli_plugins_test.go @@ -473,7 +473,7 @@ func (s *DockerSuite) TestPluginUpgrade(c *check.C) { func (s *DockerSuite) TestPluginMetricsCollector(c *check.C) { testRequires(c, DaemonIsLinux, Network, SameHostDaemon, IsAmd64) - d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{}) + d := daemon.New(c, dockerBinary, dockerdBinary) d.Start(c) defer d.Stop(c) diff --git a/components/engine/integration-cli/docker_hub_pull_suite_test.go b/components/engine/integration-cli/docker_hub_pull_suite_test.go index a8d6aedad3..125b8c10aa 100644 --- a/components/engine/integration-cli/docker_hub_pull_suite_test.go +++ b/components/engine/integration-cli/docker_hub_pull_suite_test.go @@ -7,6 +7,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/daemon" + testdaemon "github.com/docker/docker/internal/test/daemon" "github.com/go-check/check" ) @@ -40,9 +41,7 @@ func newDockerHubPullSuite() *DockerHubPullSuite { // SetUpSuite starts the suite daemon. func (s *DockerHubPullSuite) SetUpSuite(c *check.C) { testRequires(c, DaemonIsLinux, SameHostDaemon) - s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{ - Experimental: testEnv.DaemonInfo.ExperimentalBuild, - }) + s.d = daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution)) s.d.Start(c) } diff --git a/components/engine/integration/build/build_session_test.go b/components/engine/integration/build/build_session_test.go index 1fde6a0f9a..af1a536769 100644 --- a/components/engine/integration/build/build_session_test.go +++ b/components/engine/integration/build/build_session_test.go @@ -9,8 +9,8 @@ import ( dclient "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/cli/build/fakecontext" - "github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/daemon" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/moby/buildkit/session" @@ -19,9 +19,7 @@ import ( ) func TestBuildWithSession(t *testing.T) { - d := daemon.New(t, "", "dockerd", daemon.Config{ - Experimental: true, - }) + d := daemon.New(t, daemon.WithExperimental) d.StartWithBusybox(t) defer d.Stop(t) diff --git a/components/engine/integration/build/build_squash_test.go b/components/engine/integration/build/build_squash_test.go index 7f264f1477..e8097fd811 100644 --- a/components/engine/integration/build/build_squash_test.go +++ b/components/engine/integration/build/build_squash_test.go @@ -10,17 +10,15 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration-cli/cli/build/fakecontext" - "github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/integration/internal/container" + "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/pkg/stdcopy" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" ) func TestBuildSquashParent(t *testing.T) { - d := daemon.New(t, "", "dockerd", daemon.Config{ - Experimental: true, - }) + d := daemon.New(t, daemon.WithExperimental) d.StartWithBusybox(t) defer d.Stop(t) diff --git a/components/engine/integration/config/config_test.go b/components/engine/integration/config/config_test.go index 6c72f2f8f9..26888b1784 100644 --- a/components/engine/integration/config/config_test.go +++ b/components/engine/integration/config/config_test.go @@ -26,8 +26,8 @@ func TestConfigList(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() @@ -117,8 +117,8 @@ func TestConfigsCreateAndDelete(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() @@ -145,8 +145,8 @@ func TestConfigsUpdate(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() @@ -196,9 +196,9 @@ func TestConfigsUpdate(t *testing.T) { func TestTemplatedConfig(t *testing.T) { d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() - client := swarm.GetClient(t, d) referencedSecretName := "referencedsecret-" + t.Name() referencedSecretSpec := swarmtypes.SecretSpec{ @@ -338,8 +338,8 @@ func TestConfigInspect(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() diff --git a/components/engine/integration/internal/swarm/service.go b/components/engine/integration/internal/swarm/service.go index 031995f87a..3f5032976b 100644 --- a/components/engine/integration/internal/swarm/service.go +++ b/components/engine/integration/internal/swarm/service.go @@ -9,7 +9,6 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" swarmtypes "github.com/docker/docker/api/types/swarm" - "github.com/docker/docker/client" "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/internal/test/environment" "github.com/gotestyourself/gotestyourself/assert" @@ -55,11 +54,7 @@ func NewSwarm(t *testing.T, testEnv *environment.Execution, ops ...func(*daemon. ops = append(ops, daemon.WithExperimental) } d := daemon.New(t, ops...) - // avoid networking conflicts - args := []string{"--iptables=false", "--swarm-default-advertise-addr=lo"} - d.StartWithBusybox(t, args...) - - d.SwarmInit(t, swarmtypes.InitRequest{}) + d.StartAndSwarmInit(t) return d } @@ -73,7 +68,8 @@ func CreateService(t *testing.T, d *daemon.Daemon, opts ...ServiceSpecOpt) strin o(&spec) } - client := GetClient(t, d) + client := d.NewClientT(t) + defer client.Close() resp, err := client.ServiceCreate(context.Background(), spec, types.ServiceCreateOptions{}) assert.NilError(t, err, "error creating service") @@ -140,7 +136,8 @@ func ServiceWithName(name string) ServiceSpecOpt { // GetRunningTasks gets the list of running tasks for a service func GetRunningTasks(t *testing.T, d *daemon.Daemon, serviceID string) []swarmtypes.Task { - client := GetClient(t, d) + client := d.NewClientT(t) + defer client.Close() filterArgs := filters.NewArgs() filterArgs.Add("desired-state", "running") @@ -156,7 +153,8 @@ func GetRunningTasks(t *testing.T, d *daemon.Daemon, serviceID string) []swarmty // ExecTask runs the passed in exec config on the given task func ExecTask(t *testing.T, d *daemon.Daemon, task swarmtypes.Task, config types.ExecConfig) types.HijackedResponse { - client := GetClient(t, d) + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() resp, err := client.ContainerExecCreate(ctx, task.Status.ContainerStatus.ContainerID, config) @@ -173,10 +171,3 @@ func ensureContainerSpec(spec *swarmtypes.ServiceSpec) { spec.TaskTemplate.ContainerSpec = &swarmtypes.ContainerSpec{} } } - -// GetClient creates a new client for the passed in swarm daemon. -func GetClient(t *testing.T, d *daemon.Daemon) client.APIClient { - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) - return client -} diff --git a/components/engine/integration/network/inspect_test.go b/components/engine/integration/network/inspect_test.go index 3f23c61ae2..8142ecdef2 100644 --- a/components/engine/integration/network/inspect_test.go +++ b/components/engine/integration/network/inspect_test.go @@ -20,8 +20,8 @@ func TestInspectNetwork(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() overlayName := "overlay1" networkCreate := types.NetworkCreate{ diff --git a/components/engine/integration/network/ipvlan/ipvlan_test.go b/components/engine/integration/network/ipvlan/ipvlan_test.go index 9de78f41bb..d42917db27 100644 --- a/components/engine/integration/network/ipvlan/ipvlan_test.go +++ b/components/engine/integration/network/ipvlan/ipvlan_test.go @@ -8,9 +8,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/network" dclient "github.com/docker/docker/client" - "github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/integration/internal/container" n "github.com/docker/docker/integration/network" + "github.com/docker/docker/internal/test/daemon" "github.com/gotestyourself/gotestyourself/assert" "github.com/gotestyourself/gotestyourself/skip" "golang.org/x/net/context" @@ -22,9 +22,7 @@ func TestDockerNetworkIpvlanPersistance(t *testing.T) { skip.If(t, testEnv.IsRemoteDaemon()) skip.If(t, !ipvlanKernelSupport(), "Kernel doesn't support ipvlan") - d := daemon.New(t, "", "dockerd", daemon.Config{ - Experimental: true, - }) + d := daemon.New(t, daemon.WithExperimental) d.StartWithBusybox(t) defer d.Stop(t) @@ -88,9 +86,7 @@ func TestDockerNetworkIpvlan(t *testing.T) { test: testIpvlanAddressing, }, } { - d := daemon.New(t, "", "dockerd", daemon.Config{ - Experimental: true, - }) + d := daemon.New(t, daemon.WithExperimental) d.StartWithBusybox(t) client, err := d.NewClient() diff --git a/components/engine/integration/network/service_test.go b/components/engine/integration/network/service_test.go index c619f54a2b..8efd7d1fac 100644 --- a/components/engine/integration/network/service_test.go +++ b/components/engine/integration/network/service_test.go @@ -17,8 +17,8 @@ func TestServiceWithPredefinedNetwork(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() hostName := "host" var instances uint64 = 1 @@ -47,9 +47,8 @@ func TestServiceRemoveKeepsIngressNetwork(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() poll.WaitOn(t, swarmIngressReady(client), swarm.NetworkPoll) diff --git a/components/engine/integration/secret/secret_test.go b/components/engine/integration/secret/secret_test.go index 4a1e1b3dc7..5ad763a601 100644 --- a/components/engine/integration/secret/secret_test.go +++ b/components/engine/integration/secret/secret_test.go @@ -25,8 +25,8 @@ func TestSecretInspect(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() @@ -48,9 +48,8 @@ func TestSecretList(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) - + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() testName0 := "test0" @@ -135,16 +134,15 @@ func TestSecretsCreateAndDelete(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) - + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() testName := "test_secret" secretID := createSecret(ctx, t, client, testName, []byte("TESTINGDATA"), nil) // create an already existin secret, daemon should return a status code of 409 - _, err = client.SecretCreate(ctx, swarmtypes.SecretSpec{ + _, err := client.SecretCreate(ctx, swarmtypes.SecretSpec{ Annotations: swarmtypes.Annotations{ Name: testName, }, @@ -183,14 +181,12 @@ func TestSecretsUpdate(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) - + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() testName := "test_secret" secretID := createSecret(ctx, t, client, testName, []byte("TESTINGDATA"), nil) - assert.NilError(t, err) insp, _, err := client.SecretInspectWithRaw(ctx, secretID) assert.NilError(t, err) @@ -233,9 +229,9 @@ func TestSecretsUpdate(t *testing.T) { func TestTemplatedSecret(t *testing.T) { d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() - client := swarm.GetClient(t, d) referencedSecretSpec := swarmtypes.SecretSpec{ Annotations: swarmtypes.Annotations{ diff --git a/components/engine/integration/service/create_test.go b/components/engine/integration/service/create_test.go index 9522b059ef..767d78b368 100644 --- a/components/engine/integration/service/create_test.go +++ b/components/engine/integration/service/create_test.go @@ -20,8 +20,8 @@ func TestCreateServiceMultipleTimes(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() overlayName := "overlay1" networkCreate := types.NetworkCreate{ @@ -78,8 +78,8 @@ func TestCreateWithDuplicateNetworkNames(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() name := "foo" networkCreate := types.NetworkCreate{ @@ -140,8 +140,8 @@ func TestCreateServiceSecretFileMode(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() secretResp, err := client.SecretCreate(ctx, swarmtypes.SecretSpec{ @@ -221,8 +221,8 @@ func TestCreateServiceConfigFileMode(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() configResp, err := client.ConfigCreate(ctx, swarmtypes.ConfigSpec{ diff --git a/components/engine/integration/service/inspect_test.go b/components/engine/integration/service/inspect_test.go index d4d342e643..e437f35888 100644 --- a/components/engine/integration/service/inspect_test.go +++ b/components/engine/integration/service/inspect_test.go @@ -23,8 +23,8 @@ func TestInspect(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() var now = time.Now() var instances uint64 = 2 diff --git a/components/engine/integration/service/network_test.go b/components/engine/integration/service/network_test.go index 6b8c891cd8..7db171a125 100644 --- a/components/engine/integration/service/network_test.go +++ b/components/engine/integration/service/network_test.go @@ -6,7 +6,6 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/network" - "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/integration/internal/swarm" "github.com/gotestyourself/gotestyourself/assert" @@ -17,12 +16,12 @@ func TestDockerNetworkConnectAlias(t *testing.T) { defer setupTest(t)() d := swarm.NewSwarm(t, testEnv) defer d.Stop(t) - client, err := client.NewClientWithOpts(client.WithHost((d.Sock()))) - assert.NilError(t, err) + client := d.NewClientT(t) + defer client.Close() ctx := context.Background() name := "test-alias" - _, err = client.NetworkCreate(ctx, name, types.NetworkCreate{ + _, err := client.NetworkCreate(ctx, name, types.NetworkCreate{ Driver: "overlay", Attachable: true, }) diff --git a/components/engine/internal/test/daemon/ops.go b/components/engine/internal/test/daemon/ops.go index 0176c19d93..288fe88070 100644 --- a/components/engine/internal/test/daemon/ops.go +++ b/components/engine/internal/test/daemon/ops.go @@ -1,5 +1,7 @@ package daemon +import "github.com/docker/docker/internal/test/environment" + // WithExperimental sets the daemon in experimental mode func WithExperimental(d *Daemon) { d.experimental = true @@ -25,3 +27,12 @@ func WithSwarmListenAddr(listenAddr string) func(*Daemon) { d.swarmListenAddr = listenAddr } } + +// WithEnvironment sets options from internal/test/environment.Execution struct +func WithEnvironment(e environment.Execution) func(*Daemon) { + return func(d *Daemon) { + if e.DaemonInfo.ExperimentalBuild { + d.experimental = true + } + } +} diff --git a/components/engine/internal/test/daemon/service.go b/components/engine/internal/test/daemon/service.go index 26e6004ae1..a0541e9716 100644 --- a/components/engine/internal/test/daemon/service.go +++ b/components/engine/internal/test/daemon/service.go @@ -13,9 +13,7 @@ import ( // ServiceConstructor defines a swarm service constructor function type ServiceConstructor func(*swarm.Service) -// CreateServiceWithOptions creates a swarm service given the specified service constructors -// and auth config -func (d *Daemon) CreateServiceWithOptions(t assert.TestingT, opts types.ServiceCreateOptions, f ...ServiceConstructor) string { +func (d *Daemon) createServiceWithOptions(t assert.TestingT, opts types.ServiceCreateOptions, f ...ServiceConstructor) string { var service swarm.Service for _, fn := range f { fn(&service) @@ -34,7 +32,7 @@ func (d *Daemon) CreateServiceWithOptions(t assert.TestingT, opts types.ServiceC // CreateService creates a swarm service given the specified service constructor func (d *Daemon) CreateService(t assert.TestingT, f ...ServiceConstructor) string { - return d.CreateServiceWithOptions(t, types.ServiceCreateOptions{}, f...) + return d.createServiceWithOptions(t, types.ServiceCreateOptions{}, f...) } // GetService returns the swarm service corresponding to the specified id diff --git a/components/engine/internal/test/daemon/swarm.go b/components/engine/internal/test/daemon/swarm.go index f0cf373468..f66c447ccb 100644 --- a/components/engine/internal/test/daemon/swarm.go +++ b/components/engine/internal/test/daemon/swarm.go @@ -14,6 +14,32 @@ const ( defaultSwarmListenAddr = "0.0.0.0" ) +// StartAndSwarmInit starts the daemon (with busybox) and init the swarm +func (d *Daemon) StartAndSwarmInit(t testingT) { + // avoid networking conflicts + args := []string{"--iptables=false", "--swarm-default-advertise-addr=lo"} + d.StartWithBusybox(t, args...) + + d.SwarmInit(t, swarm.InitRequest{}) +} + +// StartAndSwarmJoin starts the daemon (with busybox) and join the specified swarm as worker or manager +func (d *Daemon) StartAndSwarmJoin(t testingT, leader *Daemon, manager bool) { + // avoid networking conflicts + args := []string{"--iptables=false", "--swarm-default-advertise-addr=lo"} + d.StartWithBusybox(t, args...) + + tokens := leader.JoinTokens(t) + token := tokens.Worker + if manager { + token = tokens.Manager + } + d.SwarmJoin(t, swarm.JoinRequest{ + RemoteAddrs: []string{leader.SwarmListenAddr()}, + JoinToken: token, + }) +} + // SpecConstructor defines a swarm spec constructor type SpecConstructor func(*swarm.Spec) From c2c6cea1b0e0e8fd4b9191e023526bd1ea67d418 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Mon, 16 Apr 2018 10:48:58 +0200 Subject: [PATCH 3/9] Clean some integration-cli/fixtures package/files - Move go package used by both `integration-cli` and `integration` to `internal/test/fixtures`. - Remove fixtures that are not used anymore (moved to `docker/cli` a while ago) : deploy, notary, secrets. Signed-off-by: Vincent Demeester Upstream-commit: 5f56503f583f21d655394f755f71849381bd58c7 Component: engine --- .../engine/integration-cli/check_test.go | 2 +- .../docker_api_swarm_service_test.go | 2 +- .../docker_cli_plugins_test.go | 2 +- .../docker_cli_save_load_test.go | 2 +- .../fixtures/deploy/default.yaml | 9 ------ .../fixtures/deploy/remove.yaml | 11 ------- .../fixtures/deploy/secrets.yaml | 20 ------------- .../fixtures/notary/delgkey1.crt | 21 -------------- .../fixtures/notary/delgkey1.key | 27 ------------------ .../fixtures/notary/delgkey2.crt | 21 -------------- .../fixtures/notary/delgkey2.key | 27 ------------------ .../fixtures/notary/delgkey3.crt | 21 -------------- .../fixtures/notary/delgkey3.key | 27 ------------------ .../fixtures/notary/delgkey4.crt | 21 -------------- .../fixtures/notary/delgkey4.key | 27 ------------------ .../integration-cli/fixtures/notary/gen.sh | 18 ------------ .../fixtures/notary/localhost.cert | 19 ------------ .../fixtures/notary/localhost.key | 27 ------------------ .../integration-cli/fixtures/secrets/default | 1 - .../fixtures_linux_daemon_test.go | 2 +- .../load => testdata}/emptyLayer.tar | Bin .../plugin/logging/helpers_test.go | 2 +- .../plugin/volumes/helpers_test.go | 2 +- .../integration/plugin/volumes/mounts_test.go | 2 +- .../internal/test/environment/environment.go | 2 +- .../test}/fixtures/load/frozen.go | 2 +- .../test}/fixtures/plugin/basic/basic.go | 0 .../test}/fixtures/plugin/plugin.go | 7 +++-- 28 files changed, 14 insertions(+), 310 deletions(-) delete mode 100644 components/engine/integration-cli/fixtures/deploy/default.yaml delete mode 100644 components/engine/integration-cli/fixtures/deploy/remove.yaml delete mode 100644 components/engine/integration-cli/fixtures/deploy/secrets.yaml delete mode 100644 components/engine/integration-cli/fixtures/notary/delgkey1.crt delete mode 100644 components/engine/integration-cli/fixtures/notary/delgkey1.key delete mode 100644 components/engine/integration-cli/fixtures/notary/delgkey2.crt delete mode 100644 components/engine/integration-cli/fixtures/notary/delgkey2.key delete mode 100644 components/engine/integration-cli/fixtures/notary/delgkey3.crt delete mode 100644 components/engine/integration-cli/fixtures/notary/delgkey3.key delete mode 100644 components/engine/integration-cli/fixtures/notary/delgkey4.crt delete mode 100644 components/engine/integration-cli/fixtures/notary/delgkey4.key delete mode 100755 components/engine/integration-cli/fixtures/notary/gen.sh delete mode 100644 components/engine/integration-cli/fixtures/notary/localhost.cert delete mode 100644 components/engine/integration-cli/fixtures/notary/localhost.key delete mode 100644 components/engine/integration-cli/fixtures/secrets/default rename components/engine/integration-cli/{fixtures/load => testdata}/emptyLayer.tar (100%) rename components/engine/{integration-cli => internal/test}/fixtures/load/frozen.go (98%) rename components/engine/{integration-cli => internal/test}/fixtures/plugin/basic/basic.go (100%) rename components/engine/{integration-cli => internal/test}/fixtures/plugin/plugin.go (94%) diff --git a/components/engine/integration-cli/check_test.go b/components/engine/integration-cli/check_test.go index 6bab50f907..de1b3c65c0 100644 --- a/components/engine/integration-cli/check_test.go +++ b/components/engine/integration-cli/check_test.go @@ -19,9 +19,9 @@ import ( "github.com/docker/docker/integration-cli/cli/build/fakestorage" "github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/integration-cli/environment" - "github.com/docker/docker/integration-cli/fixtures/plugin" testdaemon "github.com/docker/docker/internal/test/daemon" ienv "github.com/docker/docker/internal/test/environment" + "github.com/docker/docker/internal/test/fixtures/plugin" "github.com/docker/docker/internal/test/registry" "github.com/docker/docker/pkg/reexec" "github.com/go-check/check" diff --git a/components/engine/integration-cli/docker_api_swarm_service_test.go b/components/engine/integration-cli/docker_api_swarm_service_test.go index e816d4f567..cdedc36948 100644 --- a/components/engine/integration-cli/docker_api_swarm_service_test.go +++ b/components/engine/integration-cli/docker_api_swarm_service_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/api/types/swarm/runtime" "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/daemon" - "github.com/docker/docker/integration-cli/fixtures/plugin" testdaemon "github.com/docker/docker/internal/test/daemon" + "github.com/docker/docker/internal/test/fixtures/plugin" "github.com/docker/docker/internal/test/registry" "github.com/go-check/check" "golang.org/x/net/context" diff --git a/components/engine/integration-cli/docker_cli_plugins_test.go b/components/engine/integration-cli/docker_cli_plugins_test.go index 8a936e3e44..483222540b 100644 --- a/components/engine/integration-cli/docker_cli_plugins_test.go +++ b/components/engine/integration-cli/docker_cli_plugins_test.go @@ -14,7 +14,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/daemon" - "github.com/docker/docker/integration-cli/fixtures/plugin" + "github.com/docker/docker/internal/test/fixtures/plugin" "github.com/go-check/check" "golang.org/x/net/context" ) diff --git a/components/engine/integration-cli/docker_cli_save_load_test.go b/components/engine/integration-cli/docker_cli_save_load_test.go index 3e6dc2dd39..d7cbc84752 100644 --- a/components/engine/integration-cli/docker_cli_save_load_test.go +++ b/components/engine/integration-cli/docker_cli_save_load_test.go @@ -332,7 +332,7 @@ func listTar(f io.Reader) ([]string, error) { func (s *DockerSuite) TestLoadZeroSizeLayer(c *check.C) { testRequires(c, DaemonIsLinux) - dockerCmd(c, "load", "-i", "fixtures/load/emptyLayer.tar") + dockerCmd(c, "load", "-i", "testdata/emptyLayer.tar") } func (s *DockerSuite) TestSaveLoadParents(c *check.C) { diff --git a/components/engine/integration-cli/fixtures/deploy/default.yaml b/components/engine/integration-cli/fixtures/deploy/default.yaml deleted file mode 100644 index f30c04f8f1..0000000000 --- a/components/engine/integration-cli/fixtures/deploy/default.yaml +++ /dev/null @@ -1,9 +0,0 @@ - -version: "3" -services: - web: - image: busybox@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 - command: top - db: - image: busybox@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 - command: "tail -f /dev/null" diff --git a/components/engine/integration-cli/fixtures/deploy/remove.yaml b/components/engine/integration-cli/fixtures/deploy/remove.yaml deleted file mode 100644 index 4337581bf8..0000000000 --- a/components/engine/integration-cli/fixtures/deploy/remove.yaml +++ /dev/null @@ -1,11 +0,0 @@ - -version: "3.1" -services: - web: - image: busybox:latest - command: top - secrets: - - special -secrets: - special: - file: fixtures/secrets/default diff --git a/components/engine/integration-cli/fixtures/deploy/secrets.yaml b/components/engine/integration-cli/fixtures/deploy/secrets.yaml deleted file mode 100644 index 6ac92cddee..0000000000 --- a/components/engine/integration-cli/fixtures/deploy/secrets.yaml +++ /dev/null @@ -1,20 +0,0 @@ - -version: "3.1" -services: - web: - image: busybox@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 - command: top - secrets: - - special - - source: super - target: foo.txt - mode: 0400 - - star -secrets: - special: - file: fixtures/secrets/default - super: - file: fixtures/secrets/default - star: - external: - name: outside diff --git a/components/engine/integration-cli/fixtures/notary/delgkey1.crt b/components/engine/integration-cli/fixtures/notary/delgkey1.crt deleted file mode 100644 index 2218f23c89..0000000000 --- a/components/engine/integration-cli/fixtures/notary/delgkey1.crt +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDhTCCAm2gAwIBAgIJAP2EcMN2UXPcMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV -BAYTAlVTMQswCQYDVQQIEwJDQTEVMBMGA1UEBxMMU2FuRnJhbmNpc2NvMQ8wDQYD -VQQKEwZEb2NrZXIxEzARBgNVBAMTCmRlbGVnYXRpb24wHhcNMTYwOTI4MTc0ODQ4 -WhcNMjYwNjI4MTc0ODQ4WjBXMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFTAT -BgNVBAcTDFNhbkZyYW5jaXNjbzEPMA0GA1UEChMGRG9ja2VyMRMwEQYDVQQDEwpk -ZWxlZ2F0aW9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvgewhaYs -Ke5s2AM7xxKrT4A6n7hW17qSnBjonCcPcwTFmYqIOdxWjYITgJuHrTwB4ZhBqWS7 -tTsUUu6hWLMeB7Uo5/GEQAAZspKkT9G/rNKF9lbWK9PPhGGkeR01c/Q932m92Hsn -fCQ0Pp/OzD3nVTh0v9HKk+PObNMOCcqG87eYs4ylPRxs0RrE/rP+bEGssKQSbeCZ -wazDnO+kiatVgKQZ2CK23iFdRE1z2rzqVDeaFWdvBqrRdWnkOZClhlLgEQ5nK2yV -B6tSqOiI3MmHyHzIkGOQJp2/s7Pe0ckEkzsjTsJW8oKHlBBl6pRxHIKzNN4VFbeB -vvYvrogrDrC/owIDAQABo1QwUjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIF -oDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQUFoHfukRa6qGk1ncON64Z -ASKlZdkwDQYJKoZIhvcNAQELBQADggEBAEq9Adpd03CPmpbRtTAJGAkjjLFr60sV -2r+/l/m9R31ZCN9ymM9nxToQ8zfMdeAh/nnPcErziil2gDVqXueCNDkRj09tmDIE -Q1Oc92uyNZNgcECow77cKZCTZSTku+qsJrYaykH5vSnia8ltcKj8inJedIcpBR+p -608HEQvF0Eg5eaLPJwH48BCb0Gqdri1dJgrNnqptz7MDr8M+u7tHVulbAd3YxLlq -JH1W2bkVUx6esbn/MUE5HL5iTuOYREEINvBSmLdmmFkampmCnCB/bDEyJeL9bAkt -ZPIi0UNSnqFKLSP1Vf8AGLXt6iO7+1OGvtsDXEEYdXVOMsSXZtUuT7A= ------END CERTIFICATE----- diff --git a/components/engine/integration-cli/fixtures/notary/delgkey1.key b/components/engine/integration-cli/fixtures/notary/delgkey1.key deleted file mode 100644 index cb37efc94a..0000000000 --- a/components/engine/integration-cli/fixtures/notary/delgkey1.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAvgewhaYsKe5s2AM7xxKrT4A6n7hW17qSnBjonCcPcwTFmYqI -OdxWjYITgJuHrTwB4ZhBqWS7tTsUUu6hWLMeB7Uo5/GEQAAZspKkT9G/rNKF9lbW -K9PPhGGkeR01c/Q932m92HsnfCQ0Pp/OzD3nVTh0v9HKk+PObNMOCcqG87eYs4yl -PRxs0RrE/rP+bEGssKQSbeCZwazDnO+kiatVgKQZ2CK23iFdRE1z2rzqVDeaFWdv -BqrRdWnkOZClhlLgEQ5nK2yVB6tSqOiI3MmHyHzIkGOQJp2/s7Pe0ckEkzsjTsJW -8oKHlBBl6pRxHIKzNN4VFbeBvvYvrogrDrC/owIDAQABAoIBAB/o8KZwsgfUhqh7 -WoViSCwQb0e0z7hoFwhpUl4uXPTGf1v6HEgDDPG0PwwgkdbwNaypQZVtWevj4NTQ -R326jjdjH1xbfQa2PZpz722L3jDqJR6plEtFxRoIv3KrCffPsrgabIu2mnnJJpDB -ixtW5cq0sT4ov2i4H0i85CWWwbSY/G/MHsvCuK9PhoCj9uToVqrf1KrAESE5q4fh -mPSYUL99KVnj7SZkUz+79rc8sLLPVks3szZACMlm1n05ZTj/d6Nd2ZZUO45DllIj -1XJghfWmnChrB/P/KYXgQ3Y9BofIAw1ra2y3wOZeqRFNsbmojcGldfdtN/iQzhEj -uk4ThokCgYEA9FTmv36N8qSPWuqX/KzkixDQ8WrDGohcB54kK98Wx4ijXx3i38SY -tFjO8YUS9GVo1+UgmRjZbzVX7xeum6+TdBBwOjNOxEQ4tzwiQBWDdGpli8BccdJ2 -OOIVxSslWhiUWfpYloXVetrR88iHbT882g795pbonDaJdXSLnij4UW8CgYEAxxrr -QFpsmOEZvI/yPSOGdG7A1RIsCeH+cEOf4cKghs7+aCtAHlIweztNOrqirl3oKI1r -I0zQl46WsaW8S/y99v9lmmnZbWwqLa4vIu0NWs0zaZdzKZw3xljMhgp4Ge69hHa2 -utCtAxcX+7q/yLlHoTiYwKdxX54iLkheCB8csw0CgYEAleEG820kkjXUIodJ2JwO -Tihwo8dEC6CeI6YktizRgnEVFqH0rCOjMO5Rc+KX8AfNOrK5PnD54LguSuKSH7qi -j04OKgWTSd43lF90+y63RtCFnibQDpp2HwrBJAQFk7EEP/XMJfnPLN/SbuMSADgM -kg8kPTFRW5Iw3DYz9z9WpE0CgYAkn6/8Q2XMbUOFqti9JEa8Lg8sYk5VdwuNbPMA -3QMYKQUk9ieyLB4c3Nik3+XCuyVUKEc31A5egmz3umu7cn8i6vGuiJ/k/8t2YZ7s -Bry5Ihu95Yzab5DW3Eiqs0xKQN79ebS9AluAwQO5Wy2h52rknfuDHIm/M+BHsSoS -xl5KFQKBgQCokCsYuX1z2GojHw369/R2aX3ovCGuHqy4k7fWxUrpHTHvth2+qNPr -84qLJ9rLWoZE5sUiZ5YdwCgW877EdfkT+v4aaBX79ixso5VdqgJ/PdnoNntah/Vq -njQiW1skn6/P5V/eyimN2n0VsyBr/zMDEtYTRP/Tb1zi/njFLQkZEA== ------END RSA PRIVATE KEY----- diff --git a/components/engine/integration-cli/fixtures/notary/delgkey2.crt b/components/engine/integration-cli/fixtures/notary/delgkey2.crt deleted file mode 100644 index bec084790a..0000000000 --- a/components/engine/integration-cli/fixtures/notary/delgkey2.crt +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDhTCCAm2gAwIBAgIJAIq8naKlYAQfMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV -BAYTAlVTMQswCQYDVQQIEwJDQTEVMBMGA1UEBxMMU2FuRnJhbmNpc2NvMQ8wDQYD -VQQKEwZEb2NrZXIxEzARBgNVBAMTCmRlbGVnYXRpb24wHhcNMTYwOTI4MTc0ODQ4 -WhcNMjYwNjI4MTc0ODQ4WjBXMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFTAT -BgNVBAcTDFNhbkZyYW5jaXNjbzEPMA0GA1UEChMGRG9ja2VyMRMwEQYDVQQDEwpk -ZWxlZ2F0aW9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyY2EWYTW -5VHipw08t675upmD6a+akiuZ1z+XpuOxZCgjZ0aHfoOe8wGKg3Ohz7UCBdD5Mob/ -L/qvRlsCaqPHGZKIyyX1HDO4mpuQQFBhYxt+ZAO3AaawEUOw2rwwMDEjLnDDTSZM -z8jxCMvsJjBDqgb8g3z+AmjducQ/OH6llldgHIBY8ioRbROCL2PGgqywWq2fThav -c70YMxtKviBGDNCouYeQ8JMK/PuLwPNDXNQAagFHVARXiUv/ILHk7ImYnSGJUcuk -JTUGN2MBnpY0eakg7i+4za8sjjqOdn+2I6aVzlGJDSiRP72nkg/cE4BqMl9FrMwK -9iS8xa9yMDLUvwIDAQABo1QwUjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIF -oDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQUvQzzFmh3Sv3HcdExY3wx -/1u6JLAwDQYJKoZIhvcNAQELBQADggEBAJcmDme2Xj/HPUPwaN/EyCmjhY73EiHO -x6Pm16tscg5JGn5A+u3CZ1DmxUYl8Hp6MaW/sWzdtL0oKJg76pynadCWh5EacFR8 -u+2GV/IcN9mSX6JQzvrqbjSqo5/FehqBD+W5h3euwwApWA3STAadYeyEfmdOA3SQ -W1vzrA1y7i8qgTqeJ7UX1sEAXlIhBK2zPYaMB+en+ZOiPyNxJYj6IDdGdD2paC9L -6H9wKC+GAUTSdCWp89HP7ETSXEGr94AXkrwU+qNsiN+OyK8ke0EMngEPh5IQoplw -/7zEZCth3oKxvR1/4S5LmTVaHI2ZlbU4q9bnY72G4tw8YQr2gcBGo4w= ------END CERTIFICATE----- diff --git a/components/engine/integration-cli/fixtures/notary/delgkey2.key b/components/engine/integration-cli/fixtures/notary/delgkey2.key deleted file mode 100644 index 5ccabe908f..0000000000 --- a/components/engine/integration-cli/fixtures/notary/delgkey2.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEogIBAAKCAQEAyY2EWYTW5VHipw08t675upmD6a+akiuZ1z+XpuOxZCgjZ0aH -foOe8wGKg3Ohz7UCBdD5Mob/L/qvRlsCaqPHGZKIyyX1HDO4mpuQQFBhYxt+ZAO3 -AaawEUOw2rwwMDEjLnDDTSZMz8jxCMvsJjBDqgb8g3z+AmjducQ/OH6llldgHIBY -8ioRbROCL2PGgqywWq2fThavc70YMxtKviBGDNCouYeQ8JMK/PuLwPNDXNQAagFH -VARXiUv/ILHk7ImYnSGJUcukJTUGN2MBnpY0eakg7i+4za8sjjqOdn+2I6aVzlGJ -DSiRP72nkg/cE4BqMl9FrMwK9iS8xa9yMDLUvwIDAQABAoIBAHmffvzx7ydESWwa -zcfdu26BkptiTvjjfJrqEd4wSewxWGPKqJqMXE8xX99A2KTZClZuKuH1mmnecQQY -iRXGrK9ewFMuHYGeKEiLlPlqR8ohXhyGLVm+t0JDwaXMp5t9G0i73O5iLTm5fNGd -FGxa9YnVW20Q8MqNczbVGH1D1zInhxzzOyFzBd4bBBJ8PdrUdyLpd7+RxY2ghnbT -p9ZANR2vk5zmDLJgZx72n/u+miJWuhY6p0v3Vq4z/HHgdhf+K6vpDdzTcYlA0rO4 -c/c+RKED3ZadGUD5QoLsmEN0e3FVSMPN1kt4ZRTqWfH8f2X4mLz33aBryTjktP6+ -1rX6ThECgYEA74wc1Tq23B5R0/GaMm1AK3Ko2zzTD8wK7NSCElh2dls02B+GzrEB -aE3A2GMQSuzb+EA0zkipwANBaqs3ZemH5G1pu4hstQsXCMd4jAJn0TmTXlplXBCf -PSc8ZUU6XcJENRr9Q7O9/TGlgahX+z0ndxYx/CMCsSu7XsMg4IZsbAcCgYEA12Vb -wKOVG15GGp7pMshr+2rQfVimARUP4gf3JnQmenktI4PfdnMW3a4L3DEHfLhIerwT -6lRp/NpxSADmuT4h1UO1l2lc+gmTVPw0Vbl6VwHpgS5Kfu4ZyM6n3S66f/dE4nu7 -hQF9yZz7vn5Agghak4p6a1wC1gdMzR1tvxFzk4kCgYByBMTskWfcWeok8Yitm+bB -R3Ar+kWT7VD97SCETusD5uG+RTNLSmEbHnc+B9kHcLo67YS0800pAeOvPBPARGnU -RmffRU5I1iB+o0MzkSmNItSMQoagTaEd4IEUyuC/I+qHRHNsOC+kRm86ycAm67LP -MhdUpe1wGxqyPjp15EXTHQKBgDKzFu+3EWfJvvKRKQ7dAh3BvKVkcl6a2Iw5l8Ej -YdM+JpPPfI/i8yTmzL/dgoem0Nii4IUtrWzo9fUe0TAVId2S/HFRSaNJEbbVTnRH -HjbQqmfPv5U08jjD+9siHp/0UfCFc1QRT8xe+RqTmReCY9+KntoaZEiAm2FEZgqt -TukRAoGAf7QqbTP5/UH1KSkX89F5qy/6GS3pw6TLj9Ufm/l/NO8Um8gag6YhEKWR -7HpkpCqjfWj8Av8ESR9cqddPGrbdqXFm9z7dCjlAd5T3Q3h/h+v+JzLQWbsI6WOb -SsOSWNyE006ZZdIiFwO6GfxpLI24sVtYKgyob6Q71oxSqfnrnT0= ------END RSA PRIVATE KEY----- diff --git a/components/engine/integration-cli/fixtures/notary/delgkey3.crt b/components/engine/integration-cli/fixtures/notary/delgkey3.crt deleted file mode 100644 index f434b45fc8..0000000000 --- a/components/engine/integration-cli/fixtures/notary/delgkey3.crt +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDhTCCAm2gAwIBAgIJAKHt/jxiWqMtMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV -BAYTAlVTMQswCQYDVQQIEwJDQTEVMBMGA1UEBxMMU2FuRnJhbmNpc2NvMQ8wDQYD -VQQKEwZEb2NrZXIxEzARBgNVBAMTCmRlbGVnYXRpb24wHhcNMTYwOTI4MTc0ODQ5 -WhcNMjYwNjI4MTc0ODQ5WjBXMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFTAT -BgNVBAcTDFNhbkZyYW5jaXNjbzEPMA0GA1UEChMGRG9ja2VyMRMwEQYDVQQDEwpk -ZWxlZ2F0aW9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqfbJk2Dk -C9FJVjV2+Q2CQrJphG3vFc1Qlu9jgVA5RhGmF9jJzetsclsV/95nBhinIGcSmPQA -l318G7Bz/cG/6O2n5+hj+S1+YOvQweReZj3d4kCeS86SOyLNTpMD9gsF0S8nR1RN -h0jD4t1vxAVeGD1o61U8/k0O5eDoeOfOSWZagKk5PhyrMZgNip4IrG46umCkFlrw -zMMcgQdwTQXywPqkr/LmYpqT1WpMlzHYTQEY8rKorIJQbPtHVYdr4UxYnNmk6fbU -biEP1DQlwjBWcFTsDLqXKP/K+e3O0/e/hMB0y7Tj9fZ7Viw0t5IKXZPsxMhwknUT -9vmPzIJO6NiniwIDAQABo1QwUjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIF -oDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQUdTXRP1EzxQ+UDZSoheVo -Mobud1cwDQYJKoZIhvcNAQELBQADggEBADV9asTWWdbmpkeRuKyi0xGho39ONK88 -xxkFlco766BVgemo/rGQj3oPuw6M6SzHFoJ6JUPjmLiAQDIGEU/2/b6LcOuLjP+4 -YejCcDTY3lSW/HMNoAmzr2foo/LngNGfe/qhVFUqV7GjFT9+XzFFBfIZ1cQiL2ed -kc8rgQxFPwWXFCSwaENWeFnMDugkd+7xanoAHq8GsJpg5fTruDTmJkUqC2RNiMLn -WM7QaqW7+lmUnMnc1IBoz0hFhgoiadWM/1RQxx51zTVw6Au1koIm4ZXu5a+/WyC8 -K1+HyUbc0AVaDaRBpRSOR9aHRwLGh6WQ4aUZQNyJroc999qfYrDEEV8= ------END CERTIFICATE----- diff --git a/components/engine/integration-cli/fixtures/notary/delgkey3.key b/components/engine/integration-cli/fixtures/notary/delgkey3.key deleted file mode 100644 index a61d18cc3d..0000000000 --- a/components/engine/integration-cli/fixtures/notary/delgkey3.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAqfbJk2DkC9FJVjV2+Q2CQrJphG3vFc1Qlu9jgVA5RhGmF9jJ -zetsclsV/95nBhinIGcSmPQAl318G7Bz/cG/6O2n5+hj+S1+YOvQweReZj3d4kCe -S86SOyLNTpMD9gsF0S8nR1RNh0jD4t1vxAVeGD1o61U8/k0O5eDoeOfOSWZagKk5 -PhyrMZgNip4IrG46umCkFlrwzMMcgQdwTQXywPqkr/LmYpqT1WpMlzHYTQEY8rKo -rIJQbPtHVYdr4UxYnNmk6fbUbiEP1DQlwjBWcFTsDLqXKP/K+e3O0/e/hMB0y7Tj -9fZ7Viw0t5IKXZPsxMhwknUT9vmPzIJO6NiniwIDAQABAoIBAQCAr/ed3A2umO7T -FDYZik3nXBiiiW4t7r+nGGgZ3/kNgY1lnuHlROxehXLZwbX1mrLnyML/BjhwezV9 -7ZNVPd6laVPpNj6DyxtWHRZ5yARlm1Al39E7CpQTrF0QsiWcpGnqIa62xjDRTpnq -askV/Q5qggyvqmE9FnFCQpEiAjlhvp7F0kVHVJm9s3MK3zSyR0UTZ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/engine/integration-cli/fixtures/notary/delgkey4.crt b/components/engine/integration-cli/fixtures/notary/delgkey4.crt deleted file mode 100644 index c8cbe46bdf..0000000000 --- a/components/engine/integration-cli/fixtures/notary/delgkey4.crt +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDhTCCAm2gAwIBAgIJANae++ZkUEWMMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV -BAYTAlVTMQswCQYDVQQIEwJDQTEVMBMGA1UEBxMMU2FuRnJhbmNpc2NvMQ8wDQYD -VQQKEwZEb2NrZXIxEzARBgNVBAMTCmRlbGVnYXRpb24wHhcNMTYwOTI4MTc0ODQ5 -WhcNMjYwNjI4MTc0ODQ5WjBXMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFTAT -BgNVBAcTDFNhbkZyYW5jaXNjbzEPMA0GA1UEChMGRG9ja2VyMRMwEQYDVQQDEwpk -ZWxlZ2F0aW9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqULAjgba -Y2I10WfqdmYnPfEqEe6iMDbzcgECb2xKafXcI4ltkQj1iO4zBTs0Ft9EzXFc5ZBh -pTjZrL6vrIa0y/CH2BiIHBJ0wRHx/40HXp4DSj3HZpVOlEMI3npRfBGNIBllUaRN -PWG7zL7DcKMIepBfPXyjBsxzH3yNiISq0W5hSiy+ImhSo3aipJUHHcp9Z9NgvpNC -3QvnxsGKRnECmDRDlxkq+FQu9Iqs/HWFYWgyfcsw+YTrWZq3qVnnqUouHO//c9PG -Ry3sZSDU97MwvkjvWys1e01Xvd3AbHx08YAsxih58i/OBKe81eD9NuZDP2KrjTxI -5xkXKhj6DV2NnQIDAQABo1QwUjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIF -oDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQUDt95hiqbQvi0KcvZGAUu -VisnztQwDQYJKoZIhvcNAQELBQADggEBAGi7qHai7MWbfeu6SlXhzIP3AIMa8TMi -lp/+mvPUFPswIVqYJ71MAN8uA7CTH3z50a2vYupGeOEtZqVJeRf+xgOEpwycncxp -Qz6wc6TWPVIoT5q1Hqxw1RD2MyKL+Y+QBDYwFxFkthpDMlX48I9frcqoJUWFxBF2 -lnRr/cE7BbPE3sMbXV3wGPlH7+eUf+CgzXJo2HB6THzagyEgNrDiz/0rCQa1ipFd -mNU3D/U6BFGmJNxhvSOtXX9escg8yjr05YwwzokHS2K4jE0ZuJPBd50C/Rvo3Mf4 -0h7/2Q95e7d42zPe9WYPu2F8KTWsf4r+6ddhKrKhYzXIcTAfHIOiO+U= ------END CERTIFICATE----- diff --git a/components/engine/integration-cli/fixtures/notary/delgkey4.key b/components/engine/integration-cli/fixtures/notary/delgkey4.key deleted file mode 100644 index f473cc495a..0000000000 --- a/components/engine/integration-cli/fixtures/notary/delgkey4.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAqULAjgbaY2I10WfqdmYnPfEqEe6iMDbzcgECb2xKafXcI4lt -kQj1iO4zBTs0Ft9EzXFc5ZBhpTjZrL6vrIa0y/CH2BiIHBJ0wRHx/40HXp4DSj3H -ZpVOlEMI3npRfBGNIBllUaRNPWG7zL7DcKMIepBfPXyjBsxzH3yNiISq0W5hSiy+ -ImhSo3aipJUHHcp9Z9NgvpNC3QvnxsGKRnECmDRDlxkq+FQu9Iqs/HWFYWgyfcsw -+YTrWZq3qVnnqUouHO//c9PGRy3sZSDU97MwvkjvWys1e01Xvd3AbHx08YAsxih5 -8i/OBKe81eD9NuZDP2KrjTxI5xkXKhj6DV2NnQIDAQABAoIBAGK0ZKnuYSiXux60 -5MvK4pOCsa/nY3mOcgVHhW4IzpRgJdIrcFOlz9ncXrBsSAIWjX7o3u2Ydvjs4DOW -t8d6frB3QiDInYcRVDjLCD6otWV97Bk9Ua0G4N4hAWkMF7ysV4oihS1JDSoAdo39 -qOdki6s9yeyHZGKwk2oHLl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qAg== ------END RSA PRIVATE KEY----- diff --git a/components/engine/integration-cli/fixtures/notary/gen.sh b/components/engine/integration-cli/fixtures/notary/gen.sh deleted file mode 100755 index 8d6381cec4..0000000000 --- a/components/engine/integration-cli/fixtures/notary/gen.sh +++ /dev/null @@ -1,18 +0,0 @@ -for selfsigned in delgkey1 delgkey2 delgkey3 delgkey4; do - subj='/C=US/ST=CA/L=SanFrancisco/O=Docker/CN=delegation' - - openssl genrsa -out "${selfsigned}.key" 2048 - openssl req -new -key "${selfsigned}.key" -out "${selfsigned}.csr" -sha256 -subj "${subj}" - cat > "${selfsigned}.cnf" < Date: Mon, 16 Apr 2018 11:50:18 +0200 Subject: [PATCH 4/9] Add myself to poule to get 2w/old PRs Signed-off-by: Lorenzo Fontana Upstream-commit: 691e0c06cef55a455d72a4d1ec9dc4d072cf5e3b Component: engine --- components/engine/poule.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/components/engine/poule.yml b/components/engine/poule.yml index 7afb79eada..fe1cb3d103 100644 --- a/components/engine/poule.yml +++ b/components/engine/poule.yml @@ -112,6 +112,7 @@ "crosbymichael", "dnephin", "duglin", + "fntlnz", "johnstep", "justincormack", "mhbauer", From a425bbca331faf9352c68190d8539c1219978a03 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Mon, 16 Apr 2018 14:39:13 +0200 Subject: [PATCH 5/9] Move fakecontext, fakegit and fakestorage to internal/test Signed-off-by: Vincent Demeester Upstream-commit: 062564084a22f71cf5807ae5dfad7d29afb12e04 Component: engine --- .../engine/integration-cli/check_test.go | 2 +- .../engine/integration-cli/cli/build/build.go | 2 +- .../integration-cli/docker_api_build_test.go | 6 +- .../integration-cli/docker_cli_build_test.go | 6 +- .../docker_cli_build_unix_test.go | 2 +- .../integration-cli/docker_cli_create_test.go | 2 +- .../integration-cli/docker_cli_run_test.go | 2 +- .../integration/build/build_session_test.go | 2 +- .../integration/build/build_squash_test.go | 2 +- .../engine/integration/build/build_test.go | 2 +- .../test}/fakecontext/context.go | 4 +- .../test}/fakegit/fakegit.go | 6 +- .../test}/fakestorage/fixtures.go | 20 ++++- .../test}/fakestorage/storage.go | 73 ++++++++++++------- 14 files changed, 83 insertions(+), 48 deletions(-) rename components/engine/{integration-cli/cli/build => internal/test}/fakecontext/context.go (94%) rename components/engine/{integration-cli/cli/build => internal/test}/fakegit/fakegit.go (93%) rename components/engine/{integration-cli/cli/build => internal/test}/fakestorage/fixtures.go (73%) rename components/engine/{integration-cli/cli/build => internal/test}/fakestorage/storage.go (65%) diff --git a/components/engine/integration-cli/check_test.go b/components/engine/integration-cli/check_test.go index e9d1d5d2c0..52d284ac9f 100644 --- a/components/engine/integration-cli/check_test.go +++ b/components/engine/integration-cli/check_test.go @@ -15,11 +15,11 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" - "github.com/docker/docker/integration-cli/cli/build/fakestorage" "github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/integration-cli/environment" testdaemon "github.com/docker/docker/internal/test/daemon" ienv "github.com/docker/docker/internal/test/environment" + "github.com/docker/docker/internal/test/fakestorage" "github.com/docker/docker/internal/test/fixtures/plugin" "github.com/docker/docker/internal/test/registry" "github.com/docker/docker/pkg/reexec" diff --git a/components/engine/integration-cli/cli/build/build.go b/components/engine/integration-cli/cli/build/build.go index dd36ecc212..71048d0d6d 100644 --- a/components/engine/integration-cli/cli/build/build.go +++ b/components/engine/integration-cli/cli/build/build.go @@ -4,7 +4,7 @@ import ( "io" "strings" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" + "github.com/docker/docker/internal/test/fakecontext" "github.com/gotestyourself/gotestyourself/icmd" ) diff --git a/components/engine/integration-cli/docker_api_build_test.go b/components/engine/integration-cli/docker_api_build_test.go index 93469f1d47..389b20db80 100644 --- a/components/engine/integration-cli/docker_api_build_test.go +++ b/components/engine/integration-cli/docker_api_build_test.go @@ -13,10 +13,10 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" - "github.com/docker/docker/integration-cli/cli/build/fakegit" - "github.com/docker/docker/integration-cli/cli/build/fakestorage" "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/fakecontext" + "github.com/docker/docker/internal/test/fakegit" + "github.com/docker/docker/internal/test/fakestorage" "github.com/go-check/check" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration-cli/docker_cli_build_test.go b/components/engine/integration-cli/docker_cli_build_test.go index 030f386c41..cd57d591f2 100644 --- a/components/engine/integration-cli/docker_cli_build_test.go +++ b/components/engine/integration-cli/docker_cli_build_test.go @@ -20,9 +20,9 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" - "github.com/docker/docker/integration-cli/cli/build/fakegit" - "github.com/docker/docker/integration-cli/cli/build/fakestorage" + "github.com/docker/docker/internal/test/fakecontext" + "github.com/docker/docker/internal/test/fakegit" + "github.com/docker/docker/internal/test/fakestorage" "github.com/docker/docker/internal/testutil" "github.com/docker/docker/pkg/archive" "github.com/go-check/check" diff --git a/components/engine/integration-cli/docker_cli_build_unix_test.go b/components/engine/integration-cli/docker_cli_build_unix_test.go index d857bd2f2c..f2d598ef58 100644 --- a/components/engine/integration-cli/docker_cli_build_unix_test.go +++ b/components/engine/integration-cli/docker_cli_build_unix_test.go @@ -18,7 +18,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" + "github.com/docker/docker/internal/test/fakecontext" units "github.com/docker/go-units" "github.com/go-check/check" "github.com/gotestyourself/gotestyourself/icmd" diff --git a/components/engine/integration-cli/docker_cli_create_test.go b/components/engine/integration-cli/docker_cli_create_test.go index 120b62bc0f..bf7096123b 100644 --- a/components/engine/integration-cli/docker_cli_create_test.go +++ b/components/engine/integration-cli/docker_cli_create_test.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" + "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/pkg/stringid" "github.com/docker/go-connections/nat" "github.com/go-check/check" diff --git a/components/engine/integration-cli/docker_cli_run_test.go b/components/engine/integration-cli/docker_cli_run_test.go index 3b6e3cbbdf..f040788280 100644 --- a/components/engine/integration-cli/docker_cli_run_test.go +++ b/components/engine/integration-cli/docker_cli_run_test.go @@ -25,7 +25,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" + "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/internal/testutil" "github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/parsers/kernel" diff --git a/components/engine/integration/build/build_session_test.go b/components/engine/integration/build/build_session_test.go index af1a536769..391b83ba30 100644 --- a/components/engine/integration/build/build_session_test.go +++ b/components/engine/integration/build/build_session_test.go @@ -8,9 +8,9 @@ import ( "testing" dclient "github.com/docker/docker/client" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" "github.com/docker/docker/integration-cli/request" "github.com/docker/docker/internal/test/daemon" + "github.com/docker/docker/internal/test/fakecontext" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/moby/buildkit/session" diff --git a/components/engine/integration/build/build_squash_test.go b/components/engine/integration/build/build_squash_test.go index e8097fd811..faac658d7d 100644 --- a/components/engine/integration/build/build_squash_test.go +++ b/components/engine/integration/build/build_squash_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/docker/docker/api/types" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/daemon" + "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/pkg/stdcopy" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/build/build_test.go b/components/engine/integration/build/build_test.go index a3f283e69e..a9f79156f7 100644 --- a/components/engine/integration/build/build_test.go +++ b/components/engine/integration/build/build_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/versions" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/pkg/jsonmessage" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration-cli/cli/build/fakecontext/context.go b/components/engine/internal/test/fakecontext/context.go similarity index 94% rename from components/engine/integration-cli/cli/build/fakecontext/context.go rename to components/engine/internal/test/fakecontext/context.go index b945a8ff17..196c694bd9 100644 --- a/components/engine/integration-cli/cli/build/fakecontext/context.go +++ b/components/engine/internal/test/fakecontext/context.go @@ -1,4 +1,4 @@ -package fakecontext // import "github.com/docker/docker/integration-cli/cli/build/fakecontext" +package fakecontext // import "github.com/docker/docker/internal/test/fakecontext" import ( "bytes" @@ -73,7 +73,7 @@ func WithFiles(files map[string]string) func(*Fake) error { func WithBinaryFiles(files map[string]*bytes.Buffer) func(*Fake) error { return func(fakeContext *Fake) error { for file, content := range files { - if err := fakeContext.Add(file, string(content.Bytes())); err != nil { + if err := fakeContext.Add(file, content.String()); err != nil { return err } } diff --git a/components/engine/integration-cli/cli/build/fakegit/fakegit.go b/components/engine/internal/test/fakegit/fakegit.go similarity index 93% rename from components/engine/integration-cli/cli/build/fakegit/fakegit.go rename to components/engine/internal/test/fakegit/fakegit.go index f7a22c9ee5..45b99608f3 100644 --- a/components/engine/integration-cli/cli/build/fakegit/fakegit.go +++ b/components/engine/internal/test/fakegit/fakegit.go @@ -1,4 +1,4 @@ -package fakegit // import "github.com/docker/docker/integration-cli/cli/build/fakegit" +package fakegit // import "github.com/docker/docker/internal/test/fakegit" import ( "fmt" @@ -9,8 +9,8 @@ import ( "os/exec" "path/filepath" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" - "github.com/docker/docker/integration-cli/cli/build/fakestorage" + "github.com/docker/docker/internal/test/fakecontext" + "github.com/docker/docker/internal/test/fakestorage" "github.com/gotestyourself/gotestyourself/assert" ) diff --git a/components/engine/integration-cli/cli/build/fakestorage/fixtures.go b/components/engine/internal/test/fakestorage/fixtures.go similarity index 73% rename from components/engine/integration-cli/cli/build/fakestorage/fixtures.go rename to components/engine/internal/test/fakestorage/fixtures.go index ad10a5ed8a..f8e80527f0 100644 --- a/components/engine/integration-cli/cli/build/fakestorage/fixtures.go +++ b/components/engine/internal/test/fakestorage/fixtures.go @@ -1,13 +1,17 @@ -package fakestorage // import "github.com/docker/docker/integration-cli/cli/build/fakestorage" +package fakestorage // import "github.com/docker/docker/internal/test/fakestorage" import ( + "context" + "io" "io/ioutil" "os" "os/exec" "path/filepath" "sync" - "github.com/docker/docker/integration-cli/cli" + "github.com/docker/docker/api/types" + "github.com/docker/docker/pkg/archive" + "github.com/gotestyourself/gotestyourself/assert" ) var ensureHTTPServerOnce sync.Once @@ -70,5 +74,15 @@ func ensureHTTPServerImage(t testingT) { t.Fatalf("could not build http server: %v", string(out)) } - cli.DockerCmd(t, "build", "-q", "-t", "httpserver", tmp) + c := testEnv.APIClient() + reader, err := archive.TarWithOptions(tmp, &archive.TarOptions{}) + assert.NilError(t, err) + resp, err := c.ImageBuild(context.Background(), reader, types.ImageBuildOptions{ + Remove: true, + ForceRemove: true, + Tags: []string{"httpserver"}, + }) + assert.NilError(t, err) + _, err = io.Copy(ioutil.Discard, resp.Body) + assert.NilError(t, err) } diff --git a/components/engine/integration-cli/cli/build/fakestorage/storage.go b/components/engine/internal/test/fakestorage/storage.go similarity index 65% rename from components/engine/integration-cli/cli/build/fakestorage/storage.go rename to components/engine/internal/test/fakestorage/storage.go index 0df602a863..ca3410ca85 100644 --- a/components/engine/integration-cli/cli/build/fakestorage/storage.go +++ b/components/engine/internal/test/fakestorage/storage.go @@ -1,20 +1,24 @@ -package fakestorage // import "github.com/docker/docker/integration-cli/cli/build/fakestorage" +package fakestorage // import "github.com/docker/docker/internal/test/fakestorage" import ( + "context" "fmt" - "net" + "io" + "io/ioutil" "net/http" "net/http/httptest" "net/url" "os" "strings" - "github.com/docker/docker/integration-cli/cli" - "github.com/docker/docker/integration-cli/cli/build" - "github.com/docker/docker/integration-cli/cli/build/fakecontext" + "github.com/docker/docker/api/types" + containertypes "github.com/docker/docker/api/types/container" + "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/request" "github.com/docker/docker/internal/test/environment" + "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/internal/testutil" + "github.com/docker/go-connections/nat" "github.com/gotestyourself/gotestyourself/assert" ) @@ -62,7 +66,7 @@ func New(t testingT, dir string, modifiers ...func(*fakecontext.Fake) error) Fak case testEnv.IsLocalDaemon(): return newLocalFakeStorage(ctx) default: - return newRemoteFileServer(t, ctx) + return newRemoteFileServer(t, ctx, testEnv.APIClient()) } return nil } @@ -101,6 +105,7 @@ type remoteFileServer struct { host string // hostname/port web server is listening to on docker host e.g. 0.0.0.0:43712 container string image string + client client.APIClient ctx *fakecontext.Fake } @@ -121,18 +126,26 @@ func (f *remoteFileServer) Close() error { f.ctx.Close() } if f.image != "" { - if err := cli.Docker(cli.Args("rmi", "-f", f.image)).Error; err != nil { + if _, err := f.client.ImageRemove(context.Background(), f.image, types.ImageRemoveOptions{ + Force: true, + }); err != nil { fmt.Fprintf(os.Stderr, "Error closing remote file server : %v\n", err) } } + if err := f.client.Close(); err != nil { + fmt.Fprintf(os.Stderr, "Error closing remote file server : %v\n", err) + } }() if f.container == "" { return nil } - return cli.Docker(cli.Args("rm", "-fv", f.container)).Error + return f.client.ContainerRemove(context.Background(), f.container, types.ContainerRemoveOptions{ + Force: true, + RemoveVolumes: true, + }) } -func newRemoteFileServer(t testingT, ctx *fakecontext.Fake) *remoteFileServer { +func newRemoteFileServer(t testingT, ctx *fakecontext.Fake, c client.APIClient) *remoteFileServer { var ( image = fmt.Sprintf("fileserver-img-%s", strings.ToLower(testutil.GenerateRandomAlphaOnlyString(10))) container = fmt.Sprintf("fileserver-cnt-%s", strings.ToLower(testutil.GenerateRandomAlphaOnlyString(10))) @@ -145,31 +158,39 @@ func newRemoteFileServer(t testingT, ctx *fakecontext.Fake) *remoteFileServer { COPY . /static`); err != nil { t.Fatal(err) } - cli.BuildCmd(t, image, build.WithoutCache, build.WithExternalBuildContext(ctx)) + resp, err := c.ImageBuild(context.Background(), ctx.AsTarReader(t), types.ImageBuildOptions{ + NoCache: true, + Tags: []string{image}, + }) + assert.NilError(t, err) + _, err = io.Copy(ioutil.Discard, resp.Body) + assert.NilError(t, err) // Start the container - cli.DockerCmd(t, "run", "-d", "-P", "--name", container, image) + b, err := c.ContainerCreate(context.Background(), &containertypes.Config{ + Image: image, + }, &containertypes.HostConfig{}, nil, container) + assert.NilError(t, err) + err = c.ContainerStart(context.Background(), b.ID, types.ContainerStartOptions{}) + assert.NilError(t, err) // Find out the system assigned port - out := cli.DockerCmd(t, "port", container, "80/tcp").Combined() - fileserverHostPort := strings.Trim(out, "\n") - _, port, err := net.SplitHostPort(fileserverHostPort) - if err != nil { - t.Fatalf("unable to parse file server host:port: %v", err) - } - - dockerHostURL, err := url.Parse(request.DaemonHost()) - if err != nil { - t.Fatalf("unable to parse daemon host URL: %v", err) - } - host, _, err := net.SplitHostPort(dockerHostURL.Host) - if err != nil { - t.Fatalf("unable to parse docker daemon host:port: %v", err) + i, err := c.ContainerInspect(context.Background(), b.ID) + assert.NilError(t, err) + newP, err := nat.NewPort("tcp", "80") + assert.NilError(t, err) + ports, exists := i.NetworkSettings.Ports[newP] + if !exists || len(ports) != 1 { + t.Fatalf("unable to find port 80/tcp for %s", container) } + host := ports[0].HostIP + port := ports[0].HostPort return &remoteFileServer{ container: container, image: image, host: fmt.Sprintf("%s:%s", host, port), - ctx: ctx} + ctx: ctx, + client: c, + } } From f4e6667402d8e434946797208fec769b644ce4cf Mon Sep 17 00:00:00 2001 From: Jeff Hajewski Date: Fri, 13 Apr 2018 13:45:57 -0500 Subject: [PATCH 6/9] Standardize artefact path for all build stages Update all build stages to output artefacts to /build Signed-off-by: Jeff Hajewski Upstream-commit: 00555f7b261111084b966920da607a504b068953 Component: engine --- components/engine/Dockerfile | 56 ++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index c27694befb..dc9f63d264 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -57,7 +57,7 @@ RUN apt-get update && apt-get install -y \ && curl -sSL https://github.com/checkpoint-restore/criu/archive/v${CRIU_VERSION}.tar.gz | tar -C /usr/src/criu/ -xz --strip-components=1 \ && cd /usr/src/criu \ && make \ - && make PREFIX=/opt/criu install-criu + && make PREFIX=/build/ install-criu FROM base AS registry # Install two versions of the registry. The first is an older version that @@ -71,12 +71,12 @@ RUN set -x \ && git clone https://github.com/docker/distribution.git "$GOPATH/src/github.com/docker/distribution" \ && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \ && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ - go build -buildmode=pie -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \ + go build -buildmode=pie -o /build/registry-v2 github.com/docker/distribution/cmd/registry \ && case $(dpkg --print-architecture) in \ amd64|ppc64*|s390x) \ (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1"); \ GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH"; \ - go build -buildmode=pie -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \ + go build -buildmode=pie -o /build/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \ ;; \ esac \ && rm -rf "$GOPATH" @@ -86,8 +86,8 @@ RUN set -x \ FROM base AS docker-py # Get the "docker-py" source so we can run their integration tests ENV DOCKER_PY_COMMIT 8b246db271a85d6541dc458838627e89c683e42f -RUN git clone https://github.com/docker/docker-py.git /docker-py \ - && cd /docker-py \ +RUN git clone https://github.com/docker/docker-py.git /build \ + && cd /build \ && git checkout -q $DOCKER_PY_COMMIT @@ -99,7 +99,7 @@ RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/go-swagger/go-swagger.git "$GOPATH/src/github.com/go-swagger/go-swagger" \ && (cd "$GOPATH/src/github.com/go-swagger/go-swagger" && git checkout -q "$GO_SWAGGER_COMMIT") \ - && go build -o /usr/local/bin/swagger github.com/go-swagger/go-swagger/cmd/swagger \ + && go build -o /build/swagger github.com/go-swagger/go-swagger/cmd/swagger \ && rm -rf "$GOPATH" @@ -107,7 +107,7 @@ FROM base AS frozen-images RUN apt-get update && apt-get install -y jq ca-certificates --no-install-recommends # Get useful and necessary Hub images so we can "docker load" locally instead of pulling COPY contrib/download-frozen-image-v2.sh / -RUN /download-frozen-image-v2.sh /docker-frozen-images \ +RUN /download-frozen-image-v2.sh /build \ buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \ busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \ busybox:glibc@sha256:0b55a30394294ab23b9afd58fab94e61a923f5834fba7ddbae7f8e0c11ba85e6 \ @@ -126,51 +126,51 @@ FROM base AS tomlv ENV INSTALL_BINARY_NAME=tomlv COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ -RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME +RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME FROM base AS vndr ENV INSTALL_BINARY_NAME=vndr COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ -RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME +RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME FROM base AS containerd RUN apt-get update && apt-get install -y btrfs-tools ENV INSTALL_BINARY_NAME=containerd COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ -RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME +RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME FROM base AS proxy ENV INSTALL_BINARY_NAME=proxy COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ -RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME +RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME FROM base AS gometalinter ENV INSTALL_BINARY_NAME=gometalinter COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ -RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME +RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME FROM base AS dockercli ENV INSTALL_BINARY_NAME=dockercli COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ -RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME +RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME FROM runtime-dev AS runc ENV INSTALL_BINARY_NAME=runc COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ -RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME +RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME FROM base AS tini RUN apt-get update && apt-get install -y cmake vim-common COPY hack/dockerfile/install/install.sh ./install.sh ENV INSTALL_BINARY_NAME=tini COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ -RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME +RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME @@ -214,19 +214,19 @@ RUN apt-get update && apt-get install -y \ bzip2 \ xz-utils \ --no-install-recommends -COPY --from=swagger /usr/local/bin/swagger* /usr/local/bin/ -COPY --from=frozen-images /docker-frozen-images /docker-frozen-images -COPY --from=gometalinter /opt/gometalinter/ /usr/local/bin/ -COPY --from=tomlv /opt/tomlv/ /usr/local/bin/ -COPY --from=vndr /opt/vndr/ /usr/local/bin/ -COPY --from=tini /opt/tini/ /usr/local/bin/ -COPY --from=runc /opt/runc/ /usr/local/bin/ -COPY --from=containerd /opt/containerd/ /usr/local/bin/ -COPY --from=proxy /opt/proxy/ /usr/local/bin/ -COPY --from=dockercli /opt/dockercli /usr/local/cli -COPY --from=registry /usr/local/bin/registry* /usr/local/bin/ -COPY --from=criu /opt/criu/ /usr/local/ -COPY --from=docker-py /docker-py /docker-py +COPY --from=swagger /build/swagger* /usr/local/bin/ +COPY --from=frozen-images /build/ /docker-frozen-images +COPY --from=gometalinter /build/ /usr/local/bin/ +COPY --from=tomlv /build/ /usr/local/bin/ +COPY --from=vndr /build/ /usr/local/bin/ +COPY --from=tini /build/ /usr/local/bin/ +COPY --from=runc /build/ /usr/local/bin/ +COPY --from=containerd /build/ /usr/local/bin/ +COPY --from=proxy /build/ /usr/local/bin/ +COPY --from=dockercli /build/ /usr/local/cli +COPY --from=registry /build/registry* /usr/local/bin/ +COPY --from=criu /build/ /usr/local/ +COPY --from=docker-py /build/ /docker-py # TODO: This is for the docker-py tests, which shouldn't really be needed for # this image, but currently CI is expecting to run this image. This should be # split out into a separate image, including all the `python-*` deps installed From 3d6d872b1c37557270392f7e76fc04f0adbafec8 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Wed, 11 Apr 2018 15:52:13 +0200 Subject: [PATCH 7/9] Add api helpers to internal/test/daemon.Daemon Porting helpers from `integration-cli/daemon.Daemon` to this struct and use the API instead of the cli. Signed-off-by: Vincent Demeester Upstream-commit: 9722214c8add2a83f6c4974848139cadc79d9f0e Component: engine --- .../engine/integration-cli/daemon/daemon.go | 21 ------------ .../docker_api_swarm_node_test.go | 2 +- .../docker_api_swarm_service_test.go | 2 +- .../integration-cli/docker_api_swarm_test.go | 6 ++-- .../integration-cli/docker_cli_daemon_test.go | 12 +++---- .../integration-cli/docker_cli_swarm_test.go | 6 ++-- .../engine/internal/test/daemon/container.go | 33 +++++++++++++++++++ 7 files changed, 45 insertions(+), 37 deletions(-) create mode 100644 components/engine/internal/test/daemon/container.go diff --git a/components/engine/integration-cli/daemon/daemon.go b/components/engine/integration-cli/daemon/daemon.go index 3087416ee0..bfbc66bdfa 100644 --- a/components/engine/integration-cli/daemon/daemon.go +++ b/components/engine/integration-cli/daemon/daemon.go @@ -70,18 +70,6 @@ func (d *Daemon) GetIDByName(name string) (string, error) { return d.inspectFieldWithError(name, "Id") } -// ActiveContainers returns the list of ids of the currently running containers -func (d *Daemon) ActiveContainers() (ids []string) { - // FIXME(vdemeester) shouldn't ignore the error - out, _ := d.Cmd("ps", "-q") - for _, id := range strings.Split(out, "\n") { - if id = strings.TrimSpace(id); id != "" { - ids = append(ids, id) - } - } - return -} - // InspectField returns the field filter by 'filter' func (d *Daemon) InspectField(name, filter string) (string, error) { return d.inspectFilter(name, filter) @@ -100,15 +88,6 @@ func (d *Daemon) inspectFieldWithError(name, field string) (string, error) { return d.inspectFilter(name, fmt.Sprintf(".%s", field)) } -// FindContainerIP returns the ip of the specified container -func (d *Daemon) FindContainerIP(id string) (string, error) { - out, err := d.Cmd("inspect", "--format='{{ .NetworkSettings.Networks.bridge.IPAddress }}'", id) - if err != nil { - return "", err - } - return strings.Trim(out, " \r\n'"), nil -} - // BuildImageWithOut builds an image with the specified dockerfile and options and returns the output func (d *Daemon) BuildImageWithOut(name, dockerfile string, useCache bool, buildFlags ...string) (string, int, error) { buildCmd := BuildImageCmdWithHost(d.dockerBinary, name, dockerfile, d.Sock(), useCache, buildFlags...) diff --git a/components/engine/integration-cli/docker_api_swarm_node_test.go b/components/engine/integration-cli/docker_api_swarm_node_test.go index 6f939ea460..191391620d 100644 --- a/components/engine/integration-cli/docker_api_swarm_node_test.go +++ b/components/engine/integration-cli/docker_api_swarm_node_test.go @@ -111,7 +111,7 @@ func (s *DockerSwarmSuite) TestAPISwarmNodeDrainPause(c *check.C) { waitAndAssert(c, defaultReconciliationTimeout, d1.CheckActiveContainerCount, checker.GreaterThan, 0) waitAndAssert(c, defaultReconciliationTimeout*2, reducedCheck(sumAsIntegers, d1.CheckActiveContainerCount, d2.CheckActiveContainerCount), checker.Equals, instances) - d2ContainerCount := len(d2.ActiveContainers()) + d2ContainerCount := len(d2.ActiveContainers(c)) // set d2 to paused, scale service up, only d1 gets new tasks d1.UpdateNode(c, d2.NodeID(), func(n *swarm.Node) { diff --git a/components/engine/integration-cli/docker_api_swarm_service_test.go b/components/engine/integration-cli/docker_api_swarm_service_test.go index cdedc36948..25572a0ed8 100644 --- a/components/engine/integration-cli/docker_api_swarm_service_test.go +++ b/components/engine/integration-cli/docker_api_swarm_service_test.go @@ -556,7 +556,7 @@ func (s *DockerSwarmSuite) TestAPISwarmServicesStateReporting(c *check.C) { getContainers := func() map[string]*daemon.Daemon { m := make(map[string]*daemon.Daemon) for _, d := range []*daemon.Daemon{d1, d2, d3} { - for _, id := range d.ActiveContainers() { + for _, id := range d.ActiveContainers(c) { m[id] = d } } diff --git a/components/engine/integration-cli/docker_api_swarm_test.go b/components/engine/integration-cli/docker_api_swarm_test.go index 69fcdd3e82..b67b9f92dc 100644 --- a/components/engine/integration-cli/docker_api_swarm_test.go +++ b/components/engine/integration-cli/docker_api_swarm_test.go @@ -507,11 +507,11 @@ func (s *DockerSwarmSuite) TestAPISwarmScaleNoRollingUpdate(c *check.C) { id := d.CreateService(c, simpleTestService, setInstances(instances)) waitAndAssert(c, defaultReconciliationTimeout, d.CheckActiveContainerCount, checker.Equals, instances) - containers := d.ActiveContainers() + containers := d.ActiveContainers(c) instances = 4 d.UpdateService(c, d.GetService(c, id), setInstances(instances)) waitAndAssert(c, defaultReconciliationTimeout, d.CheckActiveContainerCount, checker.Equals, instances) - containers2 := d.ActiveContainers() + containers2 := d.ActiveContainers(c) loop0: for _, c1 := range containers { @@ -943,7 +943,7 @@ func (s *DockerSwarmSuite) TestAPISwarmHealthcheckNone(c *check.C) { waitAndAssert(c, defaultReconciliationTimeout, d.CheckActiveContainerCount, checker.Equals, instances) - containers := d.ActiveContainers() + containers := d.ActiveContainers(c) out, err = d.Cmd("exec", containers[0], "ping", "-c1", "-W3", "top") c.Assert(err, checker.IsNil, check.Commentf(out)) diff --git a/components/engine/integration-cli/docker_cli_daemon_test.go b/components/engine/integration-cli/docker_cli_daemon_test.go index 975f06d2b4..b9ed41ca96 100644 --- a/components/engine/integration-cli/docker_cli_daemon_test.go +++ b/components/engine/integration-cli/docker_cli_daemon_test.go @@ -604,8 +604,7 @@ func (s *DockerDaemonSuite) TestDaemonBridgeExternal(c *check.C) { _, err = d.Cmd("run", "-d", "--name", "ExtContainer", "busybox", "top") c.Assert(err, check.IsNil) - containerIP, err := d.FindContainerIP("ExtContainer") - c.Assert(err, checker.IsNil) + containerIP := d.FindContainerIP(c, "ExtContainer") ip := net.ParseIP(containerIP) c.Assert(bridgeIPNet.Contains(ip), check.Equals, true, check.Commentf("Container IP-Address must be in the same subnet range : %s", @@ -676,8 +675,7 @@ func (s *DockerDaemonSuite) TestDaemonBridgeIP(c *check.C) { _, err := d.Cmd("run", "-d", "--name", "test", "busybox", "top") c.Assert(err, check.IsNil) - containerIP, err := d.FindContainerIP("test") - c.Assert(err, checker.IsNil) + containerIP := d.FindContainerIP(c, "test") ip = net.ParseIP(containerIP) c.Assert(bridgeIPNet.Contains(ip), check.Equals, true, check.Commentf("Container IP-Address must be in the same subnet range : %s", @@ -947,10 +945,8 @@ func (s *DockerDaemonSuite) TestDaemonLinksIpTablesRulesWhenLinkAndUnlink(c *che _, err = s.d.Cmd("run", "-d", "--name", "parent", "--link", "child:http", "busybox", "top") c.Assert(err, check.IsNil) - childIP, err := s.d.FindContainerIP("child") - c.Assert(err, checker.IsNil) - parentIP, err := s.d.FindContainerIP("parent") - c.Assert(err, checker.IsNil) + childIP := s.d.FindContainerIP(c, "child") + parentIP := s.d.FindContainerIP(c, "parent") sourceRule := []string{"-i", bridgeName, "-o", bridgeName, "-p", "tcp", "-s", childIP, "--sport", "80", "-d", parentIP, "-j", "ACCEPT"} destinationRule := []string{"-i", bridgeName, "-o", bridgeName, "-p", "tcp", "-s", parentIP, "--dport", "80", "-d", childIP, "-j", "ACCEPT"} diff --git a/components/engine/integration-cli/docker_cli_swarm_test.go b/components/engine/integration-cli/docker_cli_swarm_test.go index 0d11555574..56fde1f1ec 100644 --- a/components/engine/integration-cli/docker_cli_swarm_test.go +++ b/components/engine/integration-cli/docker_cli_swarm_test.go @@ -177,7 +177,7 @@ func (s *DockerSwarmSuite) TestSwarmServiceTemplatingHostname(c *check.C) { // make sure task has been deployed. waitAndAssert(c, defaultReconciliationTimeout, d.CheckActiveContainerCount, checker.Equals, 1) - containers := d.ActiveContainers() + containers := d.ActiveContainers(c) out, err = d.Cmd("inspect", "--type", "container", "--format", "{{.Config.Hostname}}", containers[0]) c.Assert(err, checker.IsNil, check.Commentf(out)) c.Assert(strings.Split(out, "\n")[0], checker.Equals, "test-1-"+strings.Split(hostname, "\n")[0], check.Commentf("hostname with templating invalid")) @@ -1675,7 +1675,7 @@ func (s *DockerSwarmSuite) TestSwarmReadonlyRootfs(c *check.C) { c.Assert(err, checker.IsNil, check.Commentf(out)) c.Assert(strings.TrimSpace(out), checker.Equals, "true") - containers := d.ActiveContainers() + containers := d.ActiveContainers(c) out, err = d.Cmd("inspect", "--type", "container", "--format", "{{.HostConfig.ReadonlyRootfs}}", containers[0]) c.Assert(err, checker.IsNil, check.Commentf(out)) c.Assert(strings.TrimSpace(out), checker.Equals, "true") @@ -1762,7 +1762,7 @@ func (s *DockerSwarmSuite) TestSwarmStopSignal(c *check.C) { c.Assert(err, checker.IsNil, check.Commentf(out)) c.Assert(strings.TrimSpace(out), checker.Equals, "SIGHUP") - containers := d.ActiveContainers() + containers := d.ActiveContainers(c) out, err = d.Cmd("inspect", "--type", "container", "--format", "{{.Config.StopSignal}}", containers[0]) c.Assert(err, checker.IsNil, check.Commentf(out)) c.Assert(strings.TrimSpace(out), checker.Equals, "SIGHUP") diff --git a/components/engine/internal/test/daemon/container.go b/components/engine/internal/test/daemon/container.go new file mode 100644 index 0000000000..0adda2cf15 --- /dev/null +++ b/components/engine/internal/test/daemon/container.go @@ -0,0 +1,33 @@ +package daemon + +import ( + "context" + + "github.com/docker/docker/api/types" + "github.com/gotestyourself/gotestyourself/assert" +) + +// ActiveContainers returns the list of ids of the currently running containers +func (d *Daemon) ActiveContainers(t testingT) []string { + cli := d.NewClientT(t) + defer cli.Close() + + containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{}) + assert.NilError(t, err) + + ids := make([]string, len(containers)) + for i, c := range containers { + ids[i] = c.ID + } + return ids +} + +// FindContainerIP returns the ip of the specified container +func (d *Daemon) FindContainerIP(t testingT, id string) string { + cli := d.NewClientT(t) + defer cli.Close() + + i, err := cli.ContainerInspect(context.Background(), id) + assert.NilError(t, err) + return i.NetworkSettings.IPAddress +} From a05c5e914a668be43a62a2e312b741ccf7a88cb6 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Tue, 17 Apr 2018 10:22:04 +0200 Subject: [PATCH 8/9] =?UTF-8?q?Move=20integration-cli/request=20to=20inter?= =?UTF-8?q?nal/test/request=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … and change a bit the method signature Signed-off-by: Vincent Demeester Upstream-commit: 42f6fdf059807ecbe66cce90676021363a541154 Component: engine --- .../engine/integration-cli/daemon/daemon.go | 15 -- .../integration-cli/docker_api_attach_test.go | 2 +- .../integration-cli/docker_api_build_test.go | 2 +- .../docker_api_containers_test.go | 6 +- .../integration-cli/docker_api_create_test.go | 2 +- .../docker_api_exec_resize_test.go | 2 +- .../integration-cli/docker_api_exec_test.go | 2 +- .../integration-cli/docker_api_images_test.go | 2 +- .../integration-cli/docker_api_logs_test.go | 2 +- .../docker_api_network_test.go | 2 +- .../integration-cli/docker_api_stats_test.go | 2 +- .../integration-cli/docker_api_swarm_test.go | 8 +- .../engine/integration-cli/docker_api_test.go | 2 +- .../docker_cli_update_unix_test.go | 2 +- .../docker_deprecated_api_v124_test.go | 2 +- .../docker_deprecated_api_v124_unix_test.go | 2 +- .../integration-cli/docker_utils_test.go | 2 +- .../integration/build/build_session_test.go | 13 +- .../engine/integration/build/build_test.go | 2 +- .../integration/container/create_test.go | 2 +- .../engine/integration/container/diff_test.go | 2 +- .../engine/integration/container/exec_test.go | 2 +- .../integration/container/export_test.go | 2 +- .../integration/container/health_test.go | 2 +- .../integration/container/inspect_test.go | 2 +- .../engine/integration/container/kill_test.go | 2 +- .../integration/container/links_linux_test.go | 2 +- .../engine/integration/container/logs_test.go | 2 +- .../container/mounts_linux_test.go | 2 +- .../engine/integration/container/nat_test.go | 2 +- .../integration/container/pause_test.go | 2 +- .../engine/integration/container/ps_test.go | 2 +- .../integration/container/remove_test.go | 2 +- .../integration/container/rename_test.go | 2 +- .../integration/container/resize_test.go | 4 +- .../integration/container/stats_test.go | 2 +- .../engine/integration/container/stop_test.go | 2 +- .../container/update_linux_test.go | 2 +- .../integration/container/update_test.go | 2 +- .../engine/integration/image/commit_test.go | 2 +- .../engine/integration/image/import_test.go | 2 +- .../engine/integration/image/remove_test.go | 2 +- .../engine/integration/image/tag_test.go | 2 +- .../integration/internal/request/client.go | 42 ---- .../engine/integration/network/delete_test.go | 2 +- .../integration/session/session_test.go | 10 +- .../engine/integration/system/event_test.go | 4 +- .../integration/system/info_linux_test.go | 4 +- .../engine/integration/system/info_test.go | 2 +- .../engine/integration/system/login_test.go | 2 +- .../engine/integration/system/version_test.go | 2 +- .../engine/integration/volume/volume_test.go | 2 +- .../engine/internal/test/daemon/container.go | 4 +- .../engine/internal/test/daemon/daemon.go | 4 +- .../internal/test/fakestorage/storage.go | 2 +- .../test}/request/npipe.go | 2 +- .../test}/request/npipe_windows.go | 2 +- .../engine/internal/test/request/ops.go | 78 +++++++ .../test}/request/request.go | 194 ++++++++---------- 59 files changed, 239 insertions(+), 239 deletions(-) delete mode 100644 components/engine/integration/internal/request/client.go rename components/engine/{integration-cli => internal/test}/request/npipe.go (69%) rename components/engine/{integration-cli => internal/test}/request/npipe_windows.go (69%) create mode 100644 components/engine/internal/test/request/ops.go rename components/engine/{integration-cli => internal/test}/request/request.go (57%) diff --git a/components/engine/integration-cli/daemon/daemon.go b/components/engine/integration-cli/daemon/daemon.go index bfbc66bdfa..951cbe31f9 100644 --- a/components/engine/integration-cli/daemon/daemon.go +++ b/components/engine/integration-cli/daemon/daemon.go @@ -118,21 +118,6 @@ func (d *Daemon) WaitRun(contID string) error { return WaitInspectWithArgs(d.dockerBinary, contID, "{{.State.Running}}", "true", 10*time.Second, args...) } -// CmdRetryOutOfSequence tries the specified command against the current daemon for 10 times -func (d *Daemon) CmdRetryOutOfSequence(args ...string) (string, error) { - for i := 0; ; i++ { - out, err := d.Cmd(args...) - if err != nil { - if strings.Contains(out, "update out of sequence") { - if i < 10 { - continue - } - } - } - return out, err - } -} - // WaitInspectWithArgs waits for the specified expression to be equals to the specified expected string in the given time. // Deprecated: use cli.WaitCmd instead func WaitInspectWithArgs(dockerBinary, name, expr, expected string, timeout time.Duration, arg ...string) error { diff --git a/components/engine/integration-cli/docker_api_attach_test.go b/components/engine/integration-cli/docker_api_attach_test.go index e191f278f7..35f893e7ed 100644 --- a/components/engine/integration-cli/docker_api_attach_test.go +++ b/components/engine/integration-cli/docker_api_attach_test.go @@ -15,7 +15,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/stdcopy" "github.com/go-check/check" "golang.org/x/net/websocket" diff --git a/components/engine/integration-cli/docker_api_build_test.go b/components/engine/integration-cli/docker_api_build_test.go index 389b20db80..e997274a05 100644 --- a/components/engine/integration-cli/docker_api_build_test.go +++ b/components/engine/integration-cli/docker_api_build_test.go @@ -13,10 +13,10 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/internal/test/fakegit" "github.com/docker/docker/internal/test/fakestorage" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration-cli/docker_api_containers_test.go b/components/engine/integration-cli/docker_api_containers_test.go index 2da31ac3e1..6b8b10119d 100644 --- a/components/engine/integration-cli/docker_api_containers_test.go +++ b/components/engine/integration-cli/docker_api_containers_test.go @@ -24,7 +24,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/stringid" @@ -1254,13 +1254,13 @@ func (s *DockerSuite) TestContainerAPIChunkedEncoding(c *check.C) { "OpenStdin": true, } - resp, _, err := request.Post("/containers/create", request.JSONBody(config), func(req *http.Request) error { + resp, _, err := request.Post("/containers/create", request.JSONBody(config), request.With(func(req *http.Request) error { // This is a cheat to make the http request do chunked encoding // Otherwise (just setting the Content-Encoding to chunked) net/http will overwrite // https://golang.org/src/pkg/net/http/request.go?s=11980:12172 req.ContentLength = -1 return nil - }) + })) c.Assert(err, checker.IsNil, check.Commentf("error creating container with chunked encoding")) defer resp.Body.Close() c.Assert(resp.StatusCode, checker.Equals, http.StatusCreated) diff --git a/components/engine/integration-cli/docker_api_create_test.go b/components/engine/integration-cli/docker_api_create_test.go index 760e715b18..0e5a1307e6 100644 --- a/components/engine/integration-cli/docker_api_create_test.go +++ b/components/engine/integration-cli/docker_api_create_test.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" ) diff --git a/components/engine/integration-cli/docker_api_exec_resize_test.go b/components/engine/integration-cli/docker_api_exec_resize_test.go index 7289b2689c..37a266a277 100644 --- a/components/engine/integration-cli/docker_api_exec_resize_test.go +++ b/components/engine/integration-cli/docker_api_exec_resize_test.go @@ -10,7 +10,7 @@ import ( "sync" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" ) diff --git a/components/engine/integration-cli/docker_api_exec_test.go b/components/engine/integration-cli/docker_api_exec_test.go index ffc7da4fc5..a23cedc0dc 100644 --- a/components/engine/integration-cli/docker_api_exec_test.go +++ b/components/engine/integration-cli/docker_api_exec_test.go @@ -15,7 +15,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" "golang.org/x/net/context" ) diff --git a/components/engine/integration-cli/docker_api_images_test.go b/components/engine/integration-cli/docker_api_images_test.go index 5e47858da6..21bfbc6217 100644 --- a/components/engine/integration-cli/docker_api_images_test.go +++ b/components/engine/integration-cli/docker_api_images_test.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" "golang.org/x/net/context" ) diff --git a/components/engine/integration-cli/docker_api_logs_test.go b/components/engine/integration-cli/docker_api_logs_test.go index 46ca5172c3..36dbb4bbb5 100644 --- a/components/engine/integration-cli/docker_api_logs_test.go +++ b/components/engine/integration-cli/docker_api_logs_test.go @@ -14,7 +14,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/stdcopy" "github.com/go-check/check" "golang.org/x/net/context" diff --git a/components/engine/integration-cli/docker_api_network_test.go b/components/engine/integration-cli/docker_api_network_test.go index f0c26e2d94..21418306ec 100644 --- a/components/engine/integration-cli/docker_api_network_test.go +++ b/components/engine/integration-cli/docker_api_network_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/network" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" ) diff --git a/components/engine/integration-cli/docker_api_stats_test.go b/components/engine/integration-cli/docker_api_stats_test.go index 1818c3b4ea..5606ddbd68 100644 --- a/components/engine/integration-cli/docker_api_stats_test.go +++ b/components/engine/integration-cli/docker_api_stats_test.go @@ -15,7 +15,7 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" "golang.org/x/net/context" ) diff --git a/components/engine/integration-cli/docker_api_swarm_test.go b/components/engine/integration-cli/docker_api_swarm_test.go index b67b9f92dc..86ccfe1cb6 100644 --- a/components/engine/integration-cli/docker_api_swarm_test.go +++ b/components/engine/integration-cli/docker_api_swarm_test.go @@ -22,8 +22,8 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/daemon" - "github.com/docker/docker/integration-cli/request" testdaemon "github.com/docker/docker/internal/test/daemon" + "github.com/docker/docker/internal/test/request" "github.com/docker/swarmkit/ca" "github.com/go-check/check" "github.com/gotestyourself/gotestyourself/assert" @@ -242,7 +242,7 @@ func (s *DockerSwarmSuite) TestAPISwarmPromoteDemote(c *check.C) { node := d1.GetNode(c, d1.NodeID()) node.Spec.Role = swarm.NodeRoleWorker url := fmt.Sprintf("/nodes/%s/update?version=%d", node.ID, node.Version.Index) - res, body, err := request.DoOnHost(d1.Sock(), url, request.Method("POST"), request.JSONBody(node.Spec)) + res, body, err := request.Post(url, request.Host(d1.Sock()), request.JSONBody(node.Spec)) c.Assert(err, checker.IsNil) b, err := request.ReadBody(body) c.Assert(err, checker.IsNil) @@ -529,7 +529,7 @@ func (s *DockerSwarmSuite) TestAPISwarmInvalidAddress(c *check.C) { req := swarm.InitRequest{ ListenAddr: "", } - res, _, err := request.DoOnHost(d.Sock(), "/swarm/init", request.Method("POST"), request.JSONBody(req)) + res, _, err := request.Post("/swarm/init", request.Host(d.Sock()), request.JSONBody(req)) c.Assert(err, checker.IsNil) c.Assert(res.StatusCode, checker.Equals, http.StatusBadRequest) @@ -537,7 +537,7 @@ func (s *DockerSwarmSuite) TestAPISwarmInvalidAddress(c *check.C) { ListenAddr: "0.0.0.0:2377", RemoteAddrs: []string{""}, } - res, _, err = request.DoOnHost(d.Sock(), "/swarm/join", request.Method("POST"), request.JSONBody(req2)) + res, _, err = request.Post("/swarm/join", request.Host(d.Sock()), request.JSONBody(req2)) c.Assert(err, checker.IsNil) c.Assert(res.StatusCode, checker.Equals, http.StatusBadRequest) } diff --git a/components/engine/integration-cli/docker_api_test.go b/components/engine/integration-cli/docker_api_test.go index e5b454fbf2..1dcaa1c4cf 100644 --- a/components/engine/integration-cli/docker_api_test.go +++ b/components/engine/integration-cli/docker_api_test.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/api" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" ) diff --git a/components/engine/integration-cli/docker_cli_update_unix_test.go b/components/engine/integration-cli/docker_cli_update_unix_test.go index 0d2d30f824..564c50f32f 100644 --- a/components/engine/integration-cli/docker_cli_update_unix_test.go +++ b/components/engine/integration-cli/docker_cli_update_unix_test.go @@ -13,7 +13,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/parsers/kernel" "github.com/go-check/check" "github.com/kr/pty" diff --git a/components/engine/integration-cli/docker_deprecated_api_v124_test.go b/components/engine/integration-cli/docker_deprecated_api_v124_test.go index 279efddd8e..0f3f99b438 100644 --- a/components/engine/integration-cli/docker_deprecated_api_v124_test.go +++ b/components/engine/integration-cli/docker_deprecated_api_v124_test.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" ) diff --git a/components/engine/integration-cli/docker_deprecated_api_v124_unix_test.go b/components/engine/integration-cli/docker_deprecated_api_v124_unix_test.go index 20a8885908..c182b2a7aa 100644 --- a/components/engine/integration-cli/docker_deprecated_api_v124_unix_test.go +++ b/components/engine/integration-cli/docker_deprecated_api_v124_unix_test.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/docker/docker/integration-cli/checker" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" ) diff --git a/components/engine/integration-cli/docker_utils_test.go b/components/engine/integration-cli/docker_utils_test.go index a5fb437e4c..93006395d5 100644 --- a/components/engine/integration-cli/docker_utils_test.go +++ b/components/engine/integration-cli/docker_utils_test.go @@ -18,7 +18,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/daemon" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/go-check/check" "github.com/gotestyourself/gotestyourself/icmd" "golang.org/x/net/context" diff --git a/components/engine/integration/build/build_session_test.go b/components/engine/integration/build/build_session_test.go index 391b83ba30..ff04b63d8f 100644 --- a/components/engine/integration/build/build_session_test.go +++ b/components/engine/integration/build/build_session_test.go @@ -8,9 +8,9 @@ import ( "testing" dclient "github.com/docker/docker/client" - "github.com/docker/docker/integration-cli/request" "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/internal/test/fakecontext" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/moby/buildkit/session" @@ -65,8 +65,9 @@ func TestBuildWithSession(t *testing.T) { // rebuild with regular tar, confirm cache still applies fctx.Add("Dockerfile", dockerfile) // FIXME(vdemeester) use sock here - res, body, err := request.DoOnHost(d.Sock(), + res, body, err := request.Do( "/build", + request.Host(d.Sock()), request.Method(http.MethodPost), request.RawContent(fctx.AsTarReader(t)), request.ContentType("application/x-tar")) @@ -103,14 +104,14 @@ func testBuildWithSession(t *testing.T, client dclient.APIClient, daemonSock str g.Go(func() error { // FIXME use sock here - res, body, err := request.DoOnHost( - daemonSock, + res, body, err := request.Do( "/build?remote=client-session&session="+sess.ID(), + request.Host(daemonSock), request.Method(http.MethodPost), - func(req *http.Request) error { + request.With(func(req *http.Request) error { req.Body = ioutil.NopCloser(strings.NewReader(dockerfile)) return nil - }, + }), ) if err != nil { return err diff --git a/components/engine/integration/build/build_test.go b/components/engine/integration/build/build_test.go index a9f79156f7..880c0197a4 100644 --- a/components/engine/integration/build/build_test.go +++ b/components/engine/integration/build/build_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/versions" - "github.com/docker/docker/integration/internal/request" "github.com/docker/docker/internal/test/fakecontext" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/jsonmessage" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/container/create_test.go b/components/engine/integration/container/create_test.go index 521584d88a..61a07bcc97 100644 --- a/components/engine/integration/container/create_test.go +++ b/components/engine/integration/container/create_test.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/gotestyourself/gotestyourself/skip" ) diff --git a/components/engine/integration/container/diff_test.go b/components/engine/integration/container/diff_test.go index 56fb983b1d..fee58391e9 100644 --- a/components/engine/integration/container/diff_test.go +++ b/components/engine/integration/container/diff_test.go @@ -7,7 +7,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/archive" "github.com/gotestyourself/gotestyourself/assert" "github.com/gotestyourself/gotestyourself/poll" diff --git a/components/engine/integration/container/exec_test.go b/components/engine/integration/container/exec_test.go index 1b710432d1..790f3fe3da 100644 --- a/components/engine/integration/container/exec_test.go +++ b/components/engine/integration/container/exec_test.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/strslice" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" ) diff --git a/components/engine/integration/container/export_test.go b/components/engine/integration/container/export_test.go index 1b7eff44be..dbeea341cd 100644 --- a/components/engine/integration/container/export_test.go +++ b/components/engine/integration/container/export_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" "github.com/docker/docker/internal/test/daemon" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/jsonmessage" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/container/health_test.go b/components/engine/integration/container/health_test.go index 651cb2b00c..e13885002d 100644 --- a/components/engine/integration/container/health_test.go +++ b/components/engine/integration/container/health_test.go @@ -9,7 +9,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/poll" ) diff --git a/components/engine/integration/container/inspect_test.go b/components/engine/integration/container/inspect_test.go index 0433522e68..8ed5904433 100644 --- a/components/engine/integration/container/inspect_test.go +++ b/components/engine/integration/container/inspect_test.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/gotestyourself/gotestyourself/poll" diff --git a/components/engine/integration/container/kill_test.go b/components/engine/integration/container/kill_test.go index 4df28966f0..8cef5bb897 100644 --- a/components/engine/integration/container/kill_test.go +++ b/components/engine/integration/container/kill_test.go @@ -8,7 +8,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/gotestyourself/gotestyourself/poll" diff --git a/components/engine/integration/container/links_linux_test.go b/components/engine/integration/container/links_linux_test.go index ed5966bc7b..4fafd32c85 100644 --- a/components/engine/integration/container/links_linux_test.go +++ b/components/engine/integration/container/links_linux_test.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/gotestyourself/gotestyourself/skip" diff --git a/components/engine/integration/container/logs_test.go b/components/engine/integration/container/logs_test.go index ba64ea1391..80e3d9a6c6 100644 --- a/components/engine/integration/container/logs_test.go +++ b/components/engine/integration/container/logs_test.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/stdcopy" "github.com/gotestyourself/gotestyourself/assert" "github.com/gotestyourself/gotestyourself/skip" diff --git a/components/engine/integration/container/mounts_linux_test.go b/components/engine/integration/container/mounts_linux_test.go index 38aa98355a..884eebb1b4 100644 --- a/components/engine/integration/container/mounts_linux_test.go +++ b/components/engine/integration/container/mounts_linux_test.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/network" "github.com/docker/docker/client" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/system" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/container/nat_test.go b/components/engine/integration/container/nat_test.go index 5e7402770b..12541b6a0a 100644 --- a/components/engine/integration/container/nat_test.go +++ b/components/engine/integration/container/nat_test.go @@ -13,7 +13,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/go-connections/nat" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/container/pause_test.go b/components/engine/integration/container/pause_test.go index dd8356f853..449b623957 100644 --- a/components/engine/integration/container/pause_test.go +++ b/components/engine/integration/container/pause_test.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/container/ps_test.go b/components/engine/integration/container/ps_test.go index 2e8f3469d5..7ee92481e9 100644 --- a/components/engine/integration/container/ps_test.go +++ b/components/engine/integration/container/ps_test.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" ) diff --git a/components/engine/integration/container/remove_test.go b/components/engine/integration/container/remove_test.go index bbc521b059..5596c88042 100644 --- a/components/engine/integration/container/remove_test.go +++ b/components/engine/integration/container/remove_test.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/container/rename_test.go b/components/engine/integration/container/rename_test.go index cdeec5d27e..d35e6aa683 100644 --- a/components/engine/integration/container/rename_test.go +++ b/components/engine/integration/container/rename_test.go @@ -9,7 +9,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/docker/docker/pkg/stringid" "github.com/gotestyourself/gotestyourself/assert" diff --git a/components/engine/integration/container/resize_test.go b/components/engine/integration/container/resize_test.go index 149ac3afd1..e5d5db2df6 100644 --- a/components/engine/integration/container/resize_test.go +++ b/components/engine/integration/container/resize_test.go @@ -7,9 +7,9 @@ import ( "time" "github.com/docker/docker/api/types" - req "github.com/docker/docker/integration-cli/request" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" + req "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/container/stats_test.go b/components/engine/integration/container/stats_test.go index d10808f8f7..dbececa0e5 100644 --- a/components/engine/integration/container/stats_test.go +++ b/components/engine/integration/container/stats_test.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/gotestyourself/gotestyourself/poll" diff --git a/components/engine/integration/container/stop_test.go b/components/engine/integration/container/stop_test.go index 04aec21594..5cb970ba58 100644 --- a/components/engine/integration/container/stop_test.go +++ b/components/engine/integration/container/stop_test.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" "github.com/gotestyourself/gotestyourself/icmd" "github.com/gotestyourself/gotestyourself/poll" diff --git a/components/engine/integration/container/update_linux_test.go b/components/engine/integration/container/update_linux_test.go index a08417ea24..6e4fb637ff 100644 --- a/components/engine/integration/container/update_linux_test.go +++ b/components/engine/integration/container/update_linux_test.go @@ -9,7 +9,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/gotestyourself/gotestyourself/poll" diff --git a/components/engine/integration/container/update_test.go b/components/engine/integration/container/update_test.go index 03dcc635c6..5e407e0c0b 100644 --- a/components/engine/integration/container/update_test.go +++ b/components/engine/integration/container/update_test.go @@ -7,7 +7,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/image/commit_test.go b/components/engine/integration/image/commit_test.go index e13719b532..ea62c6257a 100644 --- a/components/engine/integration/image/commit_test.go +++ b/components/engine/integration/image/commit_test.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" ) diff --git a/components/engine/integration/image/import_test.go b/components/engine/integration/image/import_test.go index b3a0c7c76c..89dddf2cc8 100644 --- a/components/engine/integration/image/import_test.go +++ b/components/engine/integration/image/import_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/docker/docker/api/types" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" ) diff --git a/components/engine/integration/image/remove_test.go b/components/engine/integration/image/remove_test.go index c89f6f7a03..5ad09d51e0 100644 --- a/components/engine/integration/image/remove_test.go +++ b/components/engine/integration/image/remove_test.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/image/tag_test.go b/components/engine/integration/image/tag_test.go index c396c07c5c..e009114250 100644 --- a/components/engine/integration/image/tag_test.go +++ b/components/engine/integration/image/tag_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/internal/request/client.go b/components/engine/integration/internal/request/client.go deleted file mode 100644 index 07dc2e33c3..0000000000 --- a/components/engine/integration/internal/request/client.go +++ /dev/null @@ -1,42 +0,0 @@ -package request // import "github.com/docker/docker/integration/internal/request" - -import ( - "fmt" - "testing" - "time" - - "golang.org/x/net/context" - - "github.com/docker/docker/client" - "github.com/docker/docker/internal/test/environment" - "github.com/gotestyourself/gotestyourself/assert" -) - -// NewAPIClient returns a docker API client configured from environment variables -func NewAPIClient(t *testing.T, ops ...func(*client.Client) error) client.APIClient { - ops = append([]func(*client.Client) error{client.FromEnv}, ops...) - clt, err := client.NewClientWithOpts(ops...) - assert.NilError(t, err) - return clt -} - -// DaemonTime provides the current time on the daemon host -func DaemonTime(ctx context.Context, t *testing.T, client client.APIClient, testEnv *environment.Execution) time.Time { - if testEnv.IsLocalDaemon() { - return time.Now() - } - - info, err := client.Info(ctx) - assert.NilError(t, err) - - dt, err := time.Parse(time.RFC3339Nano, info.SystemTime) - assert.NilError(t, err, "invalid time format in GET /info response") - return dt -} - -// DaemonUnixTime returns the current time on the daemon host with nanoseconds precision. -// It return the time formatted how the client sends timestamps to the server. -func DaemonUnixTime(ctx context.Context, t *testing.T, client client.APIClient, testEnv *environment.Execution) string { - dt := DaemonTime(ctx, t, client, testEnv) - return fmt.Sprintf("%d.%09d", dt.Unix(), int64(dt.Nanosecond())) -} diff --git a/components/engine/integration/network/delete_test.go b/components/engine/integration/network/delete_test.go index e2af49de7e..49a237f71e 100644 --- a/components/engine/integration/network/delete_test.go +++ b/components/engine/integration/network/delete_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/docker/docker/api/types" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" ) diff --git a/components/engine/integration/session/session_test.go b/components/engine/integration/session/session_test.go index de9319436e..893682faba 100644 --- a/components/engine/integration/session/session_test.go +++ b/components/engine/integration/session/session_test.go @@ -4,7 +4,7 @@ import ( "net/http" "testing" - req "github.com/docker/docker/integration-cli/request" + req "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/gotestyourself/gotestyourself/skip" @@ -15,11 +15,11 @@ func TestSessionCreate(t *testing.T) { defer setupTest(t)() - res, body, err := req.Post("/session", func(r *http.Request) error { + res, body, err := req.Post("/session", req.With(func(r *http.Request) error { r.Header.Set("X-Docker-Expose-Session-Uuid", "testsessioncreate") // so we don't block default name if something else is using it r.Header.Set("Upgrade", "h2c") return nil - }) + })) assert.NilError(t, err) assert.NilError(t, body.Close()) assert.Check(t, is.DeepEqual(res.StatusCode, http.StatusSwitchingProtocols)) @@ -36,10 +36,10 @@ func TestSessionCreateWithBadUpgrade(t *testing.T) { assert.NilError(t, err) assert.Check(t, is.Contains(string(buf), "no upgrade")) - res, body, err = req.Post("/session", func(r *http.Request) error { + res, body, err = req.Post("/session", req.With(func(r *http.Request) error { r.Header.Set("Upgrade", "foo") return nil - }) + })) assert.NilError(t, err) assert.Check(t, is.DeepEqual(res.StatusCode, http.StatusBadRequest)) buf, err = req.ReadBody(body) diff --git a/components/engine/integration/system/event_test.go b/components/engine/integration/system/event_test.go index b270ffcb91..9156edf4f2 100644 --- a/components/engine/integration/system/event_test.go +++ b/components/engine/integration/system/event_test.go @@ -13,9 +13,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/strslice" - req "github.com/docker/docker/integration-cli/request" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" + req "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/jsonmessage" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" diff --git a/components/engine/integration/system/info_linux_test.go b/components/engine/integration/system/info_linux_test.go index e8bf70f9b8..c08fae1320 100644 --- a/components/engine/integration/system/info_linux_test.go +++ b/components/engine/integration/system/info_linux_test.go @@ -6,8 +6,8 @@ import ( "net/http" "testing" - req "github.com/docker/docker/integration-cli/request" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" + req "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "golang.org/x/net/context" diff --git a/components/engine/integration/system/info_test.go b/components/engine/integration/system/info_test.go index e19ba9ba3d..15aa22de8a 100644 --- a/components/engine/integration/system/info_test.go +++ b/components/engine/integration/system/info_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "golang.org/x/net/context" diff --git a/components/engine/integration/system/login_test.go b/components/engine/integration/system/login_test.go index e8ef10c30c..6956305f4a 100644 --- a/components/engine/integration/system/login_test.go +++ b/components/engine/integration/system/login_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/docker/docker/api/types" - "github.com/docker/docker/integration/internal/request" "github.com/docker/docker/integration/internal/requirement" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/gotestyourself/gotestyourself/skip" diff --git a/components/engine/integration/system/version_test.go b/components/engine/integration/system/version_test.go index 38784e3ee9..8892436fd2 100644 --- a/components/engine/integration/system/version_test.go +++ b/components/engine/integration/system/version_test.go @@ -3,7 +3,7 @@ package system // import "github.com/docker/docker/integration/system" import ( "testing" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "golang.org/x/net/context" diff --git a/components/engine/integration/volume/volume_test.go b/components/engine/integration/volume/volume_test.go index 4a747b6a6b..ac67292548 100644 --- a/components/engine/integration/volume/volume_test.go +++ b/components/engine/integration/volume/volume_test.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/api/types/filters" volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/integration/internal/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/google/go-cmp/cmp/cmpopts" "github.com/gotestyourself/gotestyourself/assert" diff --git a/components/engine/internal/test/daemon/container.go b/components/engine/internal/test/daemon/container.go index 0adda2cf15..d7e11efcdc 100644 --- a/components/engine/internal/test/daemon/container.go +++ b/components/engine/internal/test/daemon/container.go @@ -8,7 +8,7 @@ import ( ) // ActiveContainers returns the list of ids of the currently running containers -func (d *Daemon) ActiveContainers(t testingT) []string { +func (d *Daemon) ActiveContainers(t assert.TestingT) []string { cli := d.NewClientT(t) defer cli.Close() @@ -23,7 +23,7 @@ func (d *Daemon) ActiveContainers(t testingT) []string { } // FindContainerIP returns the ip of the specified container -func (d *Daemon) FindContainerIP(t testingT, id string) string { +func (d *Daemon) FindContainerIP(t assert.TestingT, id string) string { cli := d.NewClientT(t) defer cli.Close() diff --git a/components/engine/internal/test/daemon/daemon.go b/components/engine/internal/test/daemon/daemon.go index 7324503278..fbe5f5a28f 100644 --- a/components/engine/internal/test/daemon/daemon.go +++ b/components/engine/internal/test/daemon/daemon.go @@ -16,7 +16,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/events" "github.com/docker/docker/client" - "github.com/docker/docker/integration-cli/request" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/opts" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/stringid" @@ -479,7 +479,7 @@ func (d *Daemon) ReloadConfig() error { errCh := make(chan error) started := make(chan struct{}) go func() { - _, body, err := request.DoOnHost(d.Sock(), "/events", request.Method(http.MethodGet)) + _, body, err := request.Get("/events", request.Host(d.Sock())) close(started) if err != nil { errCh <- err diff --git a/components/engine/internal/test/fakestorage/storage.go b/components/engine/internal/test/fakestorage/storage.go index ca3410ca85..ee001386e6 100644 --- a/components/engine/internal/test/fakestorage/storage.go +++ b/components/engine/internal/test/fakestorage/storage.go @@ -14,9 +14,9 @@ import ( "github.com/docker/docker/api/types" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" - "github.com/docker/docker/integration-cli/request" "github.com/docker/docker/internal/test/environment" "github.com/docker/docker/internal/test/fakecontext" + "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/docker/go-connections/nat" "github.com/gotestyourself/gotestyourself/assert" diff --git a/components/engine/integration-cli/request/npipe.go b/components/engine/internal/test/request/npipe.go similarity index 69% rename from components/engine/integration-cli/request/npipe.go rename to components/engine/internal/test/request/npipe.go index 89f98cc68a..e6ab03945e 100644 --- a/components/engine/integration-cli/request/npipe.go +++ b/components/engine/internal/test/request/npipe.go @@ -1,6 +1,6 @@ // +build !windows -package request // import "github.com/docker/docker/integration-cli/request" +package request import ( "net" diff --git a/components/engine/integration-cli/request/npipe_windows.go b/components/engine/internal/test/request/npipe_windows.go similarity index 69% rename from components/engine/integration-cli/request/npipe_windows.go rename to components/engine/internal/test/request/npipe_windows.go index 54b7cefa2b..a268aac922 100644 --- a/components/engine/integration-cli/request/npipe_windows.go +++ b/components/engine/internal/test/request/npipe_windows.go @@ -1,4 +1,4 @@ -package request // import "github.com/docker/docker/integration-cli/request" +package request import ( "net" diff --git a/components/engine/internal/test/request/ops.go b/components/engine/internal/test/request/ops.go new file mode 100644 index 0000000000..c85308c476 --- /dev/null +++ b/components/engine/internal/test/request/ops.go @@ -0,0 +1,78 @@ +package request + +import ( + "bytes" + "encoding/json" + "io" + "io/ioutil" + "net/http" + "strings" +) + +// Options defines request options, like request modifiers and which host to target +type Options struct { + host string + requestModifiers []func(*http.Request) error +} + +// Host creates a modifier that sets the specified host as the request URL host +func Host(host string) func(*Options) { + return func(o *Options) { + o.host = host + } +} + +// With adds a request modifier to the options +func With(f func(*http.Request) error) func(*Options) { + return func(o *Options) { + o.requestModifiers = append(o.requestModifiers, f) + } +} + +// Method creates a modifier that sets the specified string as the request method +func Method(method string) func(*Options) { + return With(func(req *http.Request) error { + req.Method = method + return nil + }) +} + +// RawString sets the specified string as body for the request +func RawString(content string) func(*Options) { + return RawContent(ioutil.NopCloser(strings.NewReader(content))) +} + +// RawContent sets the specified reader as body for the request +func RawContent(reader io.ReadCloser) func(*Options) { + return With(func(req *http.Request) error { + req.Body = reader + return nil + }) +} + +// ContentType sets the specified Content-Type request header +func ContentType(contentType string) func(*Options) { + return With(func(req *http.Request) error { + req.Header.Set("Content-Type", contentType) + return nil + }) +} + +// JSON sets the Content-Type request header to json +func JSON(o *Options) { + ContentType("application/json")(o) +} + +// JSONBody creates a modifier that encodes the specified data to a JSON string and set it as request body. It also sets +// the Content-Type header of the request. +func JSONBody(data interface{}) func(*Options) { + return With(func(req *http.Request) error { + jsonData := bytes.NewBuffer(nil) + if err := json.NewEncoder(jsonData).Encode(data); err != nil { + return err + } + req.Body = ioutil.NopCloser(jsonData) + req.Header.Set("Content-Type", "application/json") + return nil + }) +} diff --git a/components/engine/integration-cli/request/request.go b/components/engine/internal/test/request/request.go similarity index 57% rename from components/engine/integration-cli/request/request.go rename to components/engine/internal/test/request/request.go index 4e61e09359..5b3fa4efd5 100644 --- a/components/engine/integration-cli/request/request.go +++ b/components/engine/internal/test/request/request.go @@ -1,9 +1,9 @@ -package request // import "github.com/docker/docker/integration-cli/request" +package request // import "github.com/docker/docker/internal/test/request" import ( - "bytes" + "context" "crypto/tls" - "encoding/json" + "fmt" "io" "io/ioutil" "net" @@ -11,92 +11,75 @@ import ( "net/url" "os" "path/filepath" - "strings" "time" - dclient "github.com/docker/docker/client" + "github.com/docker/docker/client" + "github.com/docker/docker/internal/test/environment" "github.com/docker/docker/opts" "github.com/docker/docker/pkg/ioutils" "github.com/docker/go-connections/sockets" "github.com/docker/go-connections/tlsconfig" + "github.com/gotestyourself/gotestyourself/assert" "github.com/pkg/errors" ) -// Method creates a modifier that sets the specified string as the request method -func Method(method string) func(*http.Request) error { - return func(req *http.Request) error { - req.Method = method - return nil +// NewAPIClient returns a docker API client configured from environment variables +func NewAPIClient(t assert.TestingT, ops ...func(*client.Client) error) client.APIClient { + ops = append([]func(*client.Client) error{client.FromEnv}, ops...) + clt, err := client.NewClientWithOpts(ops...) + assert.NilError(t, err) + return clt +} + +// DaemonTime provides the current time on the daemon host +func DaemonTime(ctx context.Context, t assert.TestingT, client client.APIClient, testEnv *environment.Execution) time.Time { + if testEnv.IsLocalDaemon() { + return time.Now() } + + info, err := client.Info(ctx) + assert.NilError(t, err) + + dt, err := time.Parse(time.RFC3339Nano, info.SystemTime) + assert.NilError(t, err, "invalid time format in GET /info response") + return dt } -// RawString sets the specified string as body for the request -func RawString(content string) func(*http.Request) error { - return RawContent(ioutil.NopCloser(strings.NewReader(content))) -} - -// RawContent sets the specified reader as body for the request -func RawContent(reader io.ReadCloser) func(*http.Request) error { - return func(req *http.Request) error { - req.Body = reader - return nil - } -} - -// ContentType sets the specified Content-Type request header -func ContentType(contentType string) func(*http.Request) error { - return func(req *http.Request) error { - req.Header.Set("Content-Type", contentType) - return nil - } -} - -// JSON sets the Content-Type request header to json -func JSON(req *http.Request) error { - return ContentType("application/json")(req) -} - -// JSONBody creates a modifier that encodes the specified data to a JSON string and set it as request body. It also sets -// the Content-Type header of the request. -func JSONBody(data interface{}) func(*http.Request) error { - return func(req *http.Request) error { - jsonData := bytes.NewBuffer(nil) - if err := json.NewEncoder(jsonData).Encode(data); err != nil { - return err - } - req.Body = ioutil.NopCloser(jsonData) - req.Header.Set("Content-Type", "application/json") - return nil - } +// DaemonUnixTime returns the current time on the daemon host with nanoseconds precision. +// It return the time formatted how the client sends timestamps to the server. +func DaemonUnixTime(ctx context.Context, t assert.TestingT, client client.APIClient, testEnv *environment.Execution) string { + dt := DaemonTime(ctx, t, client, testEnv) + return fmt.Sprintf("%d.%09d", dt.Unix(), int64(dt.Nanosecond())) } // Post creates and execute a POST request on the specified host and endpoint, with the specified request modifiers -func Post(endpoint string, modifiers ...func(*http.Request) error) (*http.Response, io.ReadCloser, error) { +func Post(endpoint string, modifiers ...func(*Options)) (*http.Response, io.ReadCloser, error) { return Do(endpoint, append(modifiers, Method(http.MethodPost))...) } // Delete creates and execute a DELETE request on the specified host and endpoint, with the specified request modifiers -func Delete(endpoint string, modifiers ...func(*http.Request) error) (*http.Response, io.ReadCloser, error) { +func Delete(endpoint string, modifiers ...func(*Options)) (*http.Response, io.ReadCloser, error) { return Do(endpoint, append(modifiers, Method(http.MethodDelete))...) } // Get creates and execute a GET request on the specified host and endpoint, with the specified request modifiers -func Get(endpoint string, modifiers ...func(*http.Request) error) (*http.Response, io.ReadCloser, error) { +func Get(endpoint string, modifiers ...func(*Options)) (*http.Response, io.ReadCloser, error) { return Do(endpoint, modifiers...) } // Do creates and execute a request on the specified endpoint, with the specified request modifiers -func Do(endpoint string, modifiers ...func(*http.Request) error) (*http.Response, io.ReadCloser, error) { - return DoOnHost(DaemonHost(), endpoint, modifiers...) -} - -// DoOnHost creates and execute a request on the specified host and endpoint, with the specified request modifiers -func DoOnHost(host, endpoint string, modifiers ...func(*http.Request) error) (*http.Response, io.ReadCloser, error) { - req, err := newRequest(host, endpoint, modifiers...) +func Do(endpoint string, modifiers ...func(*Options)) (*http.Response, io.ReadCloser, error) { + opts := &Options{ + host: DaemonHost(), + } + for _, mod := range modifiers { + mod(opts) + } + req, err := newRequest(endpoint, opts) if err != nil { return nil, nil, err } - client, err := newHTTPClient(host) + client, err := newHTTPClient(opts.host) if err != nil { return nil, nil, err } @@ -111,11 +94,17 @@ func DoOnHost(host, endpoint string, modifiers ...func(*http.Request) error) (*h return resp, body, err } +// ReadBody read the specified ReadCloser content and returns it +func ReadBody(b io.ReadCloser) ([]byte, error) { + defer b.Close() + return ioutil.ReadAll(b) +} + // newRequest creates a new http Request to the specified host and endpoint, with the specified request modifiers -func newRequest(host, endpoint string, modifiers ...func(*http.Request) error) (*http.Request, error) { - hostUrl, err := dclient.ParseHostURL(host) +func newRequest(endpoint string, opts *Options) (*http.Request, error) { + hostURL, err := client.ParseHostURL(opts.host) if err != nil { - return nil, errors.Wrapf(err, "failed parsing url %q", host) + return nil, errors.Wrapf(err, "failed parsing url %q", opts.host) } req, err := http.NewRequest("GET", endpoint, nil) if err != nil { @@ -127,13 +116,14 @@ func newRequest(host, endpoint string, modifiers ...func(*http.Request) error) ( } else { req.URL.Scheme = "http" } - req.URL.Host = hostUrl.Host + req.URL.Host = hostURL.Host - for _, config := range modifiers { + for _, config := range opts.requestModifiers { if err := config(req); err != nil { return nil, err } } + return req, nil } @@ -141,12 +131,12 @@ func newRequest(host, endpoint string, modifiers ...func(*http.Request) error) ( // TODO: Share more code with client.defaultHTTPClient func newHTTPClient(host string) (*http.Client, error) { // FIXME(vdemeester) 10*time.Second timeout of SockRequest… ? - hostUrl, err := dclient.ParseHostURL(host) + hostURL, err := client.ParseHostURL(host) if err != nil { return nil, err } transport := new(http.Transport) - if hostUrl.Scheme == "tcp" && os.Getenv("DOCKER_TLS_VERIFY") != "" { + if hostURL.Scheme == "tcp" && os.Getenv("DOCKER_TLS_VERIFY") != "" { // Setup the socket TLS configuration. tlsConfig, err := getTLSConfig() if err != nil { @@ -155,51 +145,10 @@ func newHTTPClient(host string) (*http.Client, error) { transport = &http.Transport{TLSClientConfig: tlsConfig} } transport.DisableKeepAlives = true - err = sockets.ConfigureTransport(transport, hostUrl.Scheme, hostUrl.Host) + err = sockets.ConfigureTransport(transport, hostURL.Scheme, hostURL.Host) return &http.Client{Transport: transport}, err } -// NewClient returns a new Docker API client -// Deprecated: Use Execution.APIClient() -func NewClient() (dclient.APIClient, error) { - return dclient.NewClientWithOpts(dclient.WithHost(DaemonHost())) -} - -// ReadBody read the specified ReadCloser content and returns it -func ReadBody(b io.ReadCloser) ([]byte, error) { - defer b.Close() - return ioutil.ReadAll(b) -} - -// SockConn opens a connection on the specified socket -func SockConn(timeout time.Duration, daemon string) (net.Conn, error) { - daemonURL, err := url.Parse(daemon) - if err != nil { - return nil, errors.Wrapf(err, "could not parse url %q", daemon) - } - - var c net.Conn - switch daemonURL.Scheme { - case "npipe": - return npipeDial(daemonURL.Path, timeout) - case "unix": - return net.DialTimeout(daemonURL.Scheme, daemonURL.Path, timeout) - case "tcp": - if os.Getenv("DOCKER_TLS_VERIFY") != "" { - // Setup the socket TLS configuration. - tlsConfig, err := getTLSConfig() - if err != nil { - return nil, err - } - dialer := &net.Dialer{Timeout: timeout} - return tls.DialWithDialer(dialer, daemonURL.Scheme, daemonURL.Host, tlsConfig) - } - return net.DialTimeout(daemonURL.Scheme, daemonURL.Host, timeout) - default: - return c, errors.Errorf("unknown scheme %v (%s)", daemonURL.Scheme, daemon) - } -} - func getTLSConfig() (*tls.Config, error) { dockerCertPath := os.Getenv("DOCKER_CERT_PATH") @@ -228,3 +177,32 @@ func DaemonHost() string { } return daemonURLStr } + +// SockConn opens a connection on the specified socket +func SockConn(timeout time.Duration, daemon string) (net.Conn, error) { + daemonURL, err := url.Parse(daemon) + if err != nil { + return nil, errors.Wrapf(err, "could not parse url %q", daemon) + } + + var c net.Conn + switch daemonURL.Scheme { + case "npipe": + return npipeDial(daemonURL.Path, timeout) + case "unix": + return net.DialTimeout(daemonURL.Scheme, daemonURL.Path, timeout) + case "tcp": + if os.Getenv("DOCKER_TLS_VERIFY") != "" { + // Setup the socket TLS configuration. + tlsConfig, err := getTLSConfig() + if err != nil { + return nil, err + } + dialer := &net.Dialer{Timeout: timeout} + return tls.DialWithDialer(dialer, daemonURL.Scheme, daemonURL.Host, tlsConfig) + } + return net.DialTimeout(daemonURL.Scheme, daemonURL.Host, timeout) + default: + return c, errors.Errorf("unknown scheme %v (%s)", daemonURL.Scheme, daemon) + } +} From c48e2f380884f45f84740d10d684f410b1c5b955 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 17 Apr 2018 13:35:35 -0700 Subject: [PATCH 9/9] Bump SwarmKit to 9c2aa152c3054371b833483a7ddad8d15052ec4f Relevant changes: - docker/swarmkit#2551 RoleManager will remove deleted nodes from the cluster membership - docker/swarmkit#2574 Scheduler/TaskReaper: handle unassigned tasks marked for shutdown - docker/swarmkit#2561 Avoid predefined error log - docker/swarmkit#2557 Task reaper should delete tasks with removed slots that were not yet assigned - docker/swarmkit#2587 [fips] Agent reports FIPS status - docker/swarmkit#2603 Fix manager/state/store.timedMutex Signed-off-by: Sebastiaan van Stijn Upstream-commit: 333b2f28fef4ba857905e7263e7b9bbbf7c522fc Component: engine --- components/engine/vendor.conf | 2 +- .../vendor/github.com/docker/swarmkit/LICENSE | 2 +- .../github.com/docker/swarmkit/agent/agent.go | 1 + .../docker/swarmkit/agent/config.go | 3 + .../docker/swarmkit/api/objects.pb.go | 2 +- .../docker/swarmkit/api/objects.proto | 2 +- .../docker/swarmkit/api/types.pb.go | 685 ++++++++++-------- .../docker/swarmkit/api/types.proto | 11 + .../docker/swarmkit/manager/manager.go | 8 +- .../orchestrator/taskreaper/task_reaper.go | 21 +- .../docker/swarmkit/manager/role_manager.go | 214 ++++-- .../swarmkit/manager/scheduler/scheduler.go | 6 + .../swarmkit/manager/state/store/memory.go | 2 +- .../github.com/docker/swarmkit/node/node.go | 4 + 14 files changed, 570 insertions(+), 393 deletions(-) diff --git a/components/engine/vendor.conf b/components/engine/vendor.conf index aa8011f07a..8a1554bad2 100644 --- a/components/engine/vendor.conf +++ b/components/engine/vendor.conf @@ -119,7 +119,7 @@ github.com/dmcgowan/go-tar go1.10 github.com/stevvooe/ttrpc d4528379866b0ce7e9d71f3eb96f0582fc374577 # cluster -github.com/docker/swarmkit 831df679a0b8a21b4dccd5791667d030642de7ff +github.com/docker/swarmkit 9c2aa152c3054371b833483a7ddad8d15052ec4f github.com/gogo/protobuf v0.4 github.com/cloudflare/cfssl 7fb22c8cba7ecaf98e4082d22d65800cf45e042a github.com/fernet/fernet-go 1b2437bc582b3cfbb341ee5a29f8ef5b42912ff2 diff --git a/components/engine/vendor/github.com/docker/swarmkit/LICENSE b/components/engine/vendor/github.com/docker/swarmkit/LICENSE index 8dada3edaf..e2db6ed114 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/LICENSE +++ b/components/engine/vendor/github.com/docker/swarmkit/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright 2016-2018 Docker Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/components/engine/vendor/github.com/docker/swarmkit/agent/agent.go b/components/engine/vendor/github.com/docker/swarmkit/agent/agent.go index 5a67327bd9..93a7cbc47f 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/agent/agent.go +++ b/components/engine/vendor/github.com/docker/swarmkit/agent/agent.go @@ -579,6 +579,7 @@ func (a *Agent) nodeDescriptionWithHostname(ctx context.Context, tlsInfo *api.No desc.Hostname = a.config.Hostname } desc.TLSInfo = tlsInfo + desc.FIPS = a.config.FIPS } return desc, err } diff --git a/components/engine/vendor/github.com/docker/swarmkit/agent/config.go b/components/engine/vendor/github.com/docker/swarmkit/agent/config.go index 98d5bf5728..b4293e9e03 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/agent/config.go +++ b/components/engine/vendor/github.com/docker/swarmkit/agent/config.go @@ -47,6 +47,9 @@ type Config struct { // SessionTracker, if provided, will have its SessionClosed and SessionError methods called // when sessions close and error. SessionTracker SessionTracker + + // FIPS returns whether the node is FIPS-enabled + FIPS bool } func (c *Config) validate() error { diff --git a/components/engine/vendor/github.com/docker/swarmkit/api/objects.pb.go b/components/engine/vendor/github.com/docker/swarmkit/api/objects.pb.go index 01abbe5076..848f65ddb8 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/api/objects.pb.go +++ b/components/engine/vendor/github.com/docker/swarmkit/api/objects.pb.go @@ -57,7 +57,7 @@ type Node struct { // ManagerStatus provides the current status of the node's manager // component, if the node is a manager. ManagerStatus *ManagerStatus `protobuf:"bytes,6,opt,name=manager_status,json=managerStatus" json:"manager_status,omitempty"` - // DEPRECATED: Use lb_attachments to find the ingress network + // DEPRECATED: Use Attachments to find the ingress network // The node attachment to the ingress network. Attachment *NetworkAttachment `protobuf:"bytes,7,opt,name=attachment" json:"attachment,omitempty"` // Certificate is the TLS certificate issued for the node, if any. diff --git a/components/engine/vendor/github.com/docker/swarmkit/api/objects.proto b/components/engine/vendor/github.com/docker/swarmkit/api/objects.proto index c3ee4195b5..6e596cb586 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/api/objects.proto +++ b/components/engine/vendor/github.com/docker/swarmkit/api/objects.proto @@ -59,7 +59,7 @@ message Node { // component, if the node is a manager. ManagerStatus manager_status = 6; - // DEPRECATED: Use lb_attachments to find the ingress network + // DEPRECATED: Use Attachments to find the ingress network // The node attachment to the ingress network. NetworkAttachment attachment = 7 [deprecated=true]; diff --git a/components/engine/vendor/github.com/docker/swarmkit/api/types.pb.go b/components/engine/vendor/github.com/docker/swarmkit/api/types.pb.go index 3f583261b6..98159a9fdd 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/api/types.pb.go +++ b/components/engine/vendor/github.com/docker/swarmkit/api/types.pb.go @@ -54,9 +54,11 @@ func (x ResourceType) String() string { } func (ResourceType) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} } -// TaskState enumerates the states that a task progresses through within an -// agent. States are designed to be monotonically increasing, such that if two -// states are seen by a task, the greater of the new represents the true state. +// Only the manager create a NEW task, and move the task to PENDING and ASSIGNED. +// Afterward, the manager must rely on the agent to update the task status +// (pre-run: preparing, ready, starting; +// running; +// end-state: complete, shutdown, failed, rejected) type TaskState int32 const ( @@ -71,7 +73,9 @@ const ( TaskStateCompleted TaskState = 576 TaskStateShutdown TaskState = 640 TaskStateFailed TaskState = 704 - TaskStateRejected TaskState = 768 + // TaskStateRejected means a task never ran, for instance if something about + // the environment failed (e.g. setting up a port on that node failed). + TaskStateRejected TaskState = 768 // TaskStateRemove is used to correctly handle service deletions and scale // downs. This allows us to keep track of tasks that have been marked for // deletion, but can't yet be removed because the agent is in the process of @@ -853,6 +857,8 @@ type NodeDescription struct { Engine *EngineDescription `protobuf:"bytes,4,opt,name=engine" json:"engine,omitempty"` // Information on the node's TLS setup TLSInfo *NodeTLSInfo `protobuf:"bytes,5,opt,name=tls_info,json=tlsInfo" json:"tls_info,omitempty"` + // FIPS indicates whether the node has FIPS-enabled + FIPS bool `protobuf:"varint,6,opt,name=fips,proto3" json:"fips,omitempty"` } func (m *NodeDescription) Reset() { *m = NodeDescription{} } @@ -4005,6 +4011,16 @@ func (m *NodeDescription) MarshalTo(dAtA []byte) (int, error) { } i += n9 } + if m.FIPS { + dAtA[i] = 0x30 + i++ + if m.FIPS { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } return i, nil } @@ -6364,6 +6380,9 @@ func (m *NodeDescription) Size() (n int) { l = m.TLSInfo.Size() n += 1 + l + sovTypes(uint64(l)) } + if m.FIPS { + n += 2 + } return n } @@ -7498,6 +7517,7 @@ func (this *NodeDescription) String() string { `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resources", "Resources", 1) + `,`, `Engine:` + strings.Replace(fmt.Sprintf("%v", this.Engine), "EngineDescription", "EngineDescription", 1) + `,`, `TLSInfo:` + strings.Replace(fmt.Sprintf("%v", this.TLSInfo), "NodeTLSInfo", "NodeTLSInfo", 1) + `,`, + `FIPS:` + fmt.Sprintf("%v", this.FIPS) + `,`, `}`, }, "") return s @@ -9814,6 +9834,26 @@ func (m *NodeDescription) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FIPS", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FIPS = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -17046,324 +17086,325 @@ var ( func init() { proto.RegisterFile("github.com/docker/swarmkit/api/types.proto", fileDescriptorTypes) } var fileDescriptorTypes = []byte{ - // 5091 bytes of a gzipped FileDescriptorProto + // 5116 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x7a, 0x5d, 0x6c, 0x23, 0x59, - 0x56, 0x7f, 0xec, 0xd8, 0x8e, 0x7d, 0xec, 0x24, 0xd5, 0xb7, 0xb3, 0x3d, 0x69, 0x6f, 0x4f, 0x92, + 0x56, 0x7f, 0xec, 0xd8, 0x8e, 0x7d, 0xec, 0x24, 0xd5, 0xb7, 0xb3, 0x3d, 0x69, 0x6f, 0x4f, 0xe2, 0xa9, 0x99, 0xde, 0x99, 0xed, 0x9d, 0xbf, 0xfb, 0x6b, 0x77, 0xd5, 0x33, 0xf3, 0xdf, 0x9d, 0xb1, - 0xcb, 0x95, 0x8e, 0xb7, 0x13, 0xdb, 0xba, 0x76, 0xba, 0x77, 0x91, 0xa0, 0xa8, 0x54, 0xdd, 0x38, - 0x35, 0x29, 0xd7, 0x35, 0x55, 0xe5, 0xa4, 0xcd, 0x82,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0xde, 0x49, 0xb3, 0x50, 0xda, 0x4c, 0xb6, 0xe6, 0xf0, 0x0d, - 0xae, 0x26, 0x22, 0xf4, 0x46, 0xc4, 0x42, 0x16, 0xdc, 0xb2, 0xe5, 0xa0, 0x67, 0xd4, 0x67, 0xb9, - 0xfa, 0xd4, 0x65, 0xbc, 0x64, 0x9a, 0x5b, 0x73, 0x78, 0x25, 0x52, 0x96, 0xec, 0xa4, 0x01, 0x50, - 0x8c, 0x74, 0xab, 0xdf, 0xcb, 0x40, 0x29, 0x62, 0x06, 0xe8, 0xcb, 0x50, 0xf2, 0x4c, 0x8f, 0x1a, - 0xd6, 0x68, 0x1c, 0xf0, 0x09, 0xcd, 0x37, 0x2a, 0xe7, 0x67, 0xeb, 0xc5, 0xb6, 0xe9, 0x51, 0xad, - 0xbb, 0x1b, 0xe0, 0x22, 0x63, 0x6b, 0xa3, 0x71, 0x80, 0xde, 0x80, 0xca, 0x90, 0x0c, 0xa9, 0x3f, - 0x31, 0xf6, 0x26, 0x21, 0x09, 0xa4, 0xd9, 0xca, 0x82, 0xd6, 0x60, 0x24, 0xf4, 0x0d, 0x58, 0x18, - 0x88, 0x21, 0xad, 0xce, 0xf3, 0xed, 0xf3, 0x66, 0xda, 0xe8, 0x67, 0x46, 0x8d, 0x23, 0x19, 0xf5, - 0x37, 0x33, 0xb0, 0x12, 0x53, 0xc9, 0x2f, 0x8c, 0x1d, 0x9f, 0x0c, 0x89, 0x17, 0x06, 0xe8, 0x6b, - 0x50, 0x70, 0x9d, 0xa1, 0x13, 0x06, 0xd2, 0xe6, 0xaf, 0xa7, 0xa9, 0x8d, 0x27, 0x85, 0x25, 0x18, - 0xd5, 0xa1, 0xe2, 0x93, 0x80, 0xf8, 0x47, 0x62, 0xc7, 0x4b, 0x8b, 0x5e, 0x23, 0x7c, 0x41, 0x44, - 0xdd, 0x84, 0x62, 0xd7, 0x35, 0xc3, 0x7d, 0xea, 0x0f, 0x91, 0x0a, 0x15, 0xd3, 0xb7, 0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, 0xf4, - 0x88, 0x3d, 0xfd, 0x9e, 0x26, 0x66, 0xdd, 0xfb, 0x39, 0x28, 0x46, 0x91, 0x2e, 0x5a, 0x83, 0xc2, - 0x8b, 0x0e, 0x7e, 0xa6, 0x63, 0x65, 0x4e, 0x58, 0x39, 0xe2, 0xbc, 0x10, 0x39, 0xca, 0x06, 0x2c, - 0xec, 0xd4, 0xdb, 0xf5, 0xa7, 0x3a, 0x8e, 0x4a, 0xee, 0x11, 0x40, 0x86, 0x6b, 0x55, 0x45, 0x76, - 0x10, 0xeb, 0x6c, 0xac, 0x7e, 0xff, 0x47, 0x6b, 0x73, 0x3f, 0xfc, 0xd1, 0xda, 0xdc, 0x27, 0xe7, - 0x6b, 0x99, 0xef, 0x9f, 0xaf, 0x65, 0xfe, 0xfe, 0x7c, 0x2d, 0xf3, 0x6f, 0xe7, 0x6b, 0x99, 0xbd, - 0x02, 0xbf, 0x54, 0x1e, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x92, 0xe0, 0x5d, 0x4a, 0x5c, - 0x32, 0x00, 0x00, + 0xcb, 0x95, 0x8e, 0xb7, 0xd3, 0xb6, 0x75, 0xed, 0x74, 0xef, 0x22, 0x41, 0x51, 0xa9, 0xba, 0x71, + 0x6a, 0x52, 0xae, 0x6b, 0xaa, 0xca, 0xe9, 0x36, 0x0b, 0x62, 0xc4, 0x03, 0xa0, 0x3c, 0xc1, 0x0b, + 0x2c, 0x42, 0x41, 0x48, 0xf0, 0xc6, 0x03, 0x0f, 0x20, 0x21, 0x78, 0x1a, 0x24, 0x84, 0x56, 0xbc, + 0xc0, 0x82, 0x84, 0x56, 0x20, 0x05, 0x36, 0x0f, 0xbc, 0xad, 0xe0, 0x05, 0xf1, 0xc2, 0x03, 0xba, + 0x1f, 0x55, 0xae, 0xb8, 0x2b, 0xc9, 0x0c, 0xbb, 0x2f, 0x89, 0xef, 0x39, 0xbf, 0x73, 0xee, 0xbd, + 0xe7, 0xde, 0x7b, 0x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 0xd7, 0x13, 0x4a, 0xea, 0x3b, 0x1c, + 0xcd, 0x07, 0x81, 0xa5, 0x28, 0xfa, 0x26, 0x2c, 0x39, 0x9e, 0xed, 0x58, 0x24, 0x58, 0xcf, 0x71, + 0x2d, 0x1b, 0x69, 0x5a, 0x66, 0xa3, 0x6f, 0xe6, 0xbe, 0x7f, 0xba, 0xb9, 0x80, 0x23, 0xa1, 0xea, + 0x7b, 0x50, 0x4e, 0xa8, 0x4d, 0x99, 0xdb, 0x1a, 0xe4, 0x8f, 0x4c, 0x77, 0x42, 0xe4, 0xec, 0x44, + 0xe3, 0xfd, 0xec, 0xa3, 0x8c, 0xfa, 0x11, 0xac, 0x75, 0xcc, 0x11, 0xb1, 0x1f, 0x13, 0x8f, 0xf8, + 0x8e, 0x85, 0x49, 0x40, 0x27, 0xbe, 0x45, 0xd8, 0x5c, 0x0f, 0x1d, 0xcf, 0x8e, 0xe6, 0xca, 0x7e, + 0xa7, 0x6b, 0x51, 0x35, 0x78, 0xad, 0xe5, 0x04, 0x96, 0x4f, 0x42, 0xf2, 0xb9, 0x95, 0x2c, 0x46, + 0x4a, 0x4e, 0x33, 0xb0, 0x3a, 0x2f, 0xfd, 0x33, 0x70, 0x9d, 0x99, 0xd8, 0x36, 0x7c, 0x49, 0x31, + 0x82, 0x31, 0xb1, 0xb8, 0xb2, 0xf2, 0x83, 0x77, 0xd2, 0x2c, 0x94, 0x36, 0x93, 0xed, 0x05, 0x7c, + 0x8d, 0xab, 0x89, 0x08, 0xfd, 0x31, 0xb1, 0x90, 0x05, 0x37, 0x6c, 0x39, 0xe8, 0x39, 0xf5, 0x59, + 0xae, 0x3e, 0x75, 0x19, 0x2f, 0x98, 0xe6, 0xf6, 0x02, 0x5e, 0x8b, 0x94, 0x25, 0x3b, 0x69, 0x02, + 0x14, 0x23, 0xdd, 0xea, 0xf7, 0x32, 0x50, 0x8a, 0x98, 0x01, 0xfa, 0x32, 0x94, 0x3c, 0xd3, 0xa3, + 0x86, 0x35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 0x72, 0xe9, 0x6a, 0xc7, 0x60, 0xf4, 0x30, 0xda, 0x6c, 0x22, 0x77, 0x4a, + 0x4d, 0x71, 0xa3, 0x8e, 0xd2, 0xd2, 0x8f, 0xf3, 0x09, 0x12, 0xbb, 0xe6, 0x89, 0xef, 0xcb, 0x95, + 0x67, 0x3f, 0x91, 0xc6, 0xaf, 0x05, 0x61, 0x34, 0x19, 0x7d, 0xa7, 0x16, 0x85, 0xe6, 0x56, 0x64, + 0x7b, 0x01, 0xcf, 0xe4, 0xd0, 0x87, 0x50, 0x66, 0xf3, 0x36, 0x02, 0xce, 0x93, 0x81, 0xf7, 0x85, + 0xa6, 0x12, 0x1a, 0x30, 0x8c, 0x67, 0x56, 0x7e, 0x1d, 0xc0, 0x1c, 0x8f, 0x5d, 0x87, 0xd8, 0xc6, + 0xde, 0x94, 0x47, 0xda, 0x25, 0x5c, 0x92, 0x94, 0xe6, 0x94, 0x1d, 0x97, 0x88, 0x6d, 0x86, 0x3c, + 0x7a, 0xbe, 0xc2, 0x80, 0x12, 0xdd, 0x08, 0x9b, 0x0a, 0xac, 0xf8, 0x13, 0x8f, 0x19, 0x54, 0x8e, + 0x4e, 0xfd, 0x93, 0x2c, 0xbc, 0xd6, 0x21, 0xe1, 0x0b, 0xea, 0x1f, 0x36, 0xc2, 0xd0, 0xb4, 0x0e, + 0x46, 0xc4, 0x93, 0xcb, 0x97, 0x48, 0x68, 0x32, 0xe7, 0x12, 0x9a, 0x75, 0x58, 0x32, 0x5d, 0xc7, + 0x0c, 0x88, 0x08, 0xde, 0x4a, 0x38, 0x6a, 0xb2, 0xb4, 0x8b, 0x25, 0x71, 0x24, 0x08, 0x88, 0xa8, + 0xba, 0xb0, 0x81, 0x47, 0x04, 0xf4, 0x5d, 0xb8, 0x21, 0xc3, 0x34, 0x33, 0xee, 0x8a, 0x25, 0x14, + 0x51, 0xf9, 0x56, 0x4f, 0xcd, 0x2a, 0xd3, 0x07, 0x27, 0xe3, 0xb8, 0x19, 0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xa5, + 0x40, 0x2c, 0x3e, 0x4b, 0x01, 0xb1, 0xd8, 0x5a, 0x80, 0x70, 0x77, 0xd0, 0x18, 0xe8, 0x4a, 0x3e, + 0x05, 0x84, 0x29, 0xfb, 0x2b, 0x8f, 0xdb, 0xbf, 0x64, 0x41, 0x69, 0x58, 0x16, 0x19, 0x87, 0x8c, + 0x2f, 0xb3, 0xce, 0x01, 0x14, 0xc7, 0xec, 0x97, 0x43, 0xa2, 0x08, 0xea, 0x51, 0xea, 0xbb, 0xe7, + 0x9c, 0x5c, 0x1d, 0x53, 0x97, 0x34, 0xec, 0x91, 0x13, 0x04, 0x0e, 0xf5, 0x04, 0x0d, 0xc7, 0x9a, + 0xaa, 0xff, 0x99, 0x81, 0xeb, 0x29, 0x08, 0x74, 0x0f, 0x72, 0x3e, 0x75, 0xa3, 0x35, 0xbc, 0x75, + 0x51, 0xc9, 0x96, 0x89, 0x62, 0x8e, 0x44, 0x1b, 0x00, 0xe6, 0x24, 0xa4, 0x26, 0xef, 0x9f, 0xaf, + 0x5e, 0x11, 0x27, 0x28, 0xe8, 0x39, 0x14, 0x02, 0x62, 0xf9, 0x24, 0x8a, 0xb3, 0x3f, 0xfc, 0xbf, + 0x8e, 0xbe, 0xde, 0xe7, 0x6a, 0xb0, 0x54, 0x57, 0xad, 0x43, 0x41, 0x50, 0xd8, 0xb6, 0xb7, 0xcd, + 0xd0, 0x94, 0x05, 0x7d, 0xfe, 0x9b, 0xed, 0x26, 0xd3, 0x1d, 0x46, 0xbb, 0xc9, 0x74, 0x87, 0xea, + 0x5f, 0x67, 0x01, 0xf4, 0x97, 0x21, 0xf1, 0x3d, 0xd3, 0xd5, 0x1a, 0x48, 0x4f, 0xdc, 0x0c, 0x62, + 0xb6, 0x5f, 0x4e, 0x7d, 0xc3, 0x88, 0x25, 0xea, 0x5a, 0x23, 0xe5, 0x6e, 0xb8, 0x09, 0x8b, 0x13, + 0x5f, 0x3e, 0x65, 0x8b, 0x18, 0x79, 0x17, 0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0xc4, 0xc7, 0x0e, 0x8b, 0x97, 0x7e, 0xec, 0x90, 0xfb, + 0xa9, 0x7c, 0xec, 0xa0, 0xfe, 0x0a, 0xc0, 0x96, 0xe3, 0x92, 0x81, 0xa8, 0x43, 0xa5, 0xe5, 0x97, + 0x2c, 0x86, 0x93, 0x75, 0xce, 0x28, 0x86, 0x6b, 0xb7, 0x30, 0xa3, 0x31, 0xd6, 0xd0, 0xb1, 0xe5, + 0x61, 0xe4, 0xac, 0xc7, 0x8c, 0x35, 0x74, 0xec, 0xf8, 0x55, 0x2e, 0x77, 0xd5, 0xab, 0xdc, 0x49, + 0x06, 0x56, 0x65, 0xec, 0x1a, 0xbb, 0xdf, 0x2f, 0x43, 0x49, 0x84, 0xb1, 0xb3, 0x84, 0x8e, 0x3f, + 0xf0, 0x0b, 0x5c, 0xbb, 0x85, 0x8b, 0x82, 0xdd, 0xb6, 0xd1, 0x26, 0x94, 0x25, 0x34, 0xf1, 0xd9, + 0x14, 0x08, 0x52, 0x87, 0x0d, 0xff, 0xab, 0x90, 0xdb, 0x77, 0x5c, 0x22, 0x37, 0x7a, 0xaa, 0x03, + 0x98, 0x19, 0x60, 0x7b, 0x01, 0x73, 0x74, 0xb3, 0x18, 0x15, 0xea, 0xf8, 0xf8, 0x64, 0xda, 0x99, + 0x1c, 0x9f, 0xc8, 0x40, 0xe7, 0xc6, 0x27, 0x70, 0x6c, 0x7c, 0x82, 0x2d, 0xc6, 0x27, 0xa1, 0xc9, + 0xf1, 0x09, 0xd2, 0x4f, 0x65, 0x7c, 0x3b, 0x70, 0xa3, 0xe9, 0x9a, 0xd6, 0xa1, 0xeb, 0x04, 0x21, + 0xb1, 0x93, 0x1e, 0xe3, 0x01, 0x14, 0xce, 0x05, 0x9d, 0x97, 0x55, 0x34, 0x25, 0x52, 0xfd, 0xf7, + 0x0c, 0x54, 0xb6, 0x89, 0xe9, 0x86, 0x07, 0xb3, 0xb2, 0x51, 0x48, 0x82, 0x50, 0x5e, 0x56, 0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 0x6b, 0x55, 0x45, 0x76, 0x10, 0xeb, 0x6c, 0xae, 0x7f, 0xff, 0x47, + 0x1b, 0x0b, 0x3f, 0xfc, 0xd1, 0xc6, 0xc2, 0x27, 0x67, 0x1b, 0x99, 0xef, 0x9f, 0x6d, 0x64, 0xfe, + 0xfe, 0x6c, 0x23, 0xf3, 0x6f, 0x67, 0x1b, 0x99, 0xbd, 0x02, 0xbf, 0x54, 0x1e, 0xfe, 0x6f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x80, 0x94, 0x1b, 0x9c, 0x7a, 0x32, 0x00, 0x00, } diff --git a/components/engine/vendor/github.com/docker/swarmkit/api/types.proto b/components/engine/vendor/github.com/docker/swarmkit/api/types.proto index 73c202f0be..d25d6625e9 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/api/types.proto +++ b/components/engine/vendor/github.com/docker/swarmkit/api/types.proto @@ -125,6 +125,9 @@ message NodeDescription { // Information on the node's TLS setup NodeTLSInfo tls_info = 5 [(gogoproto.customname) = "TLSInfo"]; + + // FIPS indicates whether the node has FIPS-enabled + bool fips = 6 [(gogoproto.customname) = "FIPS"]; } message NodeTLSInfo { @@ -440,6 +443,12 @@ message UpdateStatus { // TaskState enumerates the states that a task progresses through within an // agent. States are designed to be monotonically increasing, such that if two // states are seen by a task, the greater of the new represents the true state. + +// Only the manager create a NEW task, and move the task to PENDING and ASSIGNED. +// Afterward, the manager must rely on the agent to update the task status +// (pre-run: preparing, ready, starting; +// running; +// end-state: complete, shutdown, failed, rejected) enum TaskState { // TODO(aluzzardi): Move it back into `TaskStatus` because of the naming // collisions of enums. @@ -457,6 +466,8 @@ enum TaskState { COMPLETE = 576 [(gogoproto.enumvalue_customname)="TaskStateCompleted"]; // successful completion of task (not error code, just ran) SHUTDOWN = 640 [(gogoproto.enumvalue_customname)="TaskStateShutdown"]; // orchestrator requested shutdown FAILED = 704 [(gogoproto.enumvalue_customname)="TaskStateFailed"]; // task execution failed with error + // TaskStateRejected means a task never ran, for instance if something about + // the environment failed (e.g. setting up a port on that node failed). REJECTED = 768 [(gogoproto.enumvalue_customname)="TaskStateRejected"]; // task could not be executed here. // TaskStateRemove is used to correctly handle service deletions and scale // downs. This allows us to keep track of tasks that have been marked for diff --git a/components/engine/vendor/github.com/docker/swarmkit/manager/manager.go b/components/engine/vendor/github.com/docker/swarmkit/manager/manager.go index 820ad6631c..d0afdbe1c5 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/manager/manager.go +++ b/components/engine/vendor/github.com/docker/swarmkit/manager/manager.go @@ -950,15 +950,13 @@ func (m *Manager) becomeLeader(ctx context.Context) { } } // Create now the static predefined if the store does not contain predefined - //networks like bridge/host node-local networks which + // networks like bridge/host node-local networks which // are known to be present in each cluster node. This is needed // in order to allow running services on the predefined docker // networks like `bridge` and `host`. for _, p := range allocator.PredefinedNetworks() { - if store.GetNetwork(tx, p.Name) == nil { - if err := store.CreateNetwork(tx, newPredefinedNetwork(p.Name, p.Driver)); err != nil { - log.G(ctx).WithError(err).Error("failed to create predefined network " + p.Name) - } + if err := store.CreateNetwork(tx, newPredefinedNetwork(p.Name, p.Driver)); err != store.ErrNameConflict { + log.G(ctx).WithError(err).Error("failed to create predefined network " + p.Name) } } return nil diff --git a/components/engine/vendor/github.com/docker/swarmkit/manager/orchestrator/taskreaper/task_reaper.go b/components/engine/vendor/github.com/docker/swarmkit/manager/orchestrator/taskreaper/task_reaper.go index 88e353b383..1c93b77fbe 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/manager/orchestrator/taskreaper/task_reaper.go +++ b/components/engine/vendor/github.com/docker/swarmkit/manager/orchestrator/taskreaper/task_reaper.go @@ -100,10 +100,10 @@ func (tr *TaskReaper) Run(ctx context.Context) { // Serviceless tasks can be cleaned up right away since they are not attached to a service. tr.cleanup = append(tr.cleanup, t.ID) } - // tasks with desired state REMOVE that have progressed beyond COMPLETE can be cleaned up - // right away + // tasks with desired state REMOVE that have progressed beyond COMPLETE or + // haven't been assigned yet can be cleaned up right away for _, t := range removeTasks { - if t.Status.State >= api.TaskStateCompleted { + if t.Status.State < api.TaskStateAssigned || t.Status.State >= api.TaskStateCompleted { tr.cleanup = append(tr.cleanup, t.ID) } } @@ -142,10 +142,10 @@ func (tr *TaskReaper) Run(ctx context.Context) { if t.Status.State >= api.TaskStateOrphaned && t.ServiceID == "" { tr.cleanup = append(tr.cleanup, t.ID) } - // add tasks that have progressed beyond COMPLETE and have desired state REMOVE. These - // tasks are associated with slots that were removed as part of a service scale down - // or service removal. - if t.DesiredState == api.TaskStateRemove && t.Status.State >= api.TaskStateCompleted { + // add tasks that are yet unassigned or have progressed beyond COMPLETE, with + // desired state REMOVE. These tasks are associated with slots that were removed + // as part of a service scale down or service removal. + if t.DesiredState == api.TaskStateRemove && (t.Status.State < api.TaskStateAssigned || t.Status.State >= api.TaskStateCompleted) { tr.cleanup = append(tr.cleanup, t.ID) } case api.EventUpdateCluster: @@ -251,7 +251,12 @@ func (tr *TaskReaper) tick() { runningTasks := 0 for _, t := range historicTasks { - if t.DesiredState <= api.TaskStateRunning || t.Status.State <= api.TaskStateRunning { + // Skip tasks which are desired to be running but the current state + // is less than or equal to running. + // This check is important to ignore tasks which are running or need to be running, + // but to delete tasks which are either past running, + // or have not reached running but need to be shutdown (because of a service update, for example). + if t.DesiredState == api.TaskStateRunning && t.Status.State <= api.TaskStateRunning { // Don't delete running tasks runningTasks++ continue diff --git a/components/engine/vendor/github.com/docker/swarmkit/manager/role_manager.go b/components/engine/vendor/github.com/docker/swarmkit/manager/role_manager.go index c2e4f1a04d..e5cf27b62f 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/manager/role_manager.go +++ b/components/engine/vendor/github.com/docker/swarmkit/manager/role_manager.go @@ -6,11 +6,21 @@ import ( "github.com/docker/swarmkit/api" "github.com/docker/swarmkit/log" "github.com/docker/swarmkit/manager/state/raft" + "github.com/docker/swarmkit/manager/state/raft/membership" "github.com/docker/swarmkit/manager/state/store" + "github.com/pivotal-golang/clock" "golang.org/x/net/context" ) -const roleReconcileInterval = 5 * time.Second +const ( + // roleReconcileInterval is how often to retry removing a node, if a reconciliation or + // removal failed + roleReconcileInterval = 5 * time.Second + + // removalTimeout is how long to wait before a raft member removal fails to be applied + // to the store + removalTimeout = 5 * time.Second +) // roleManager reconciles the raft member list with desired role changes. type roleManager struct { @@ -21,32 +31,67 @@ type roleManager struct { raft *raft.Node doneChan chan struct{} - // pending contains changed nodes that have not yet been reconciled in + // pendingReconciliation contains changed nodes that have not yet been reconciled in // the raft member list. - pending map[string]*api.Node + pendingReconciliation map[string]*api.Node + + // pendingRemoval contains the IDs of nodes that have been deleted - if these correspond + // to members in the raft cluster, those members need to be removed from raft + pendingRemoval map[string]struct{} + + // leave this nil except for tests which need to inject a fake time source + clocksource clock.Clock } // newRoleManager creates a new roleManager. func newRoleManager(store *store.MemoryStore, raftNode *raft.Node) *roleManager { ctx, cancel := context.WithCancel(context.Background()) return &roleManager{ - ctx: ctx, - cancel: cancel, - store: store, - raft: raftNode, - doneChan: make(chan struct{}), - pending: make(map[string]*api.Node), + ctx: ctx, + cancel: cancel, + store: store, + raft: raftNode, + doneChan: make(chan struct{}), + pendingReconciliation: make(map[string]*api.Node), + pendingRemoval: make(map[string]struct{}), } } -// Run is roleManager's main loop. -// ctx is only used for logging. +// getTicker returns a ticker based on the configured clock source +func (rm *roleManager) getTicker(interval time.Duration) clock.Ticker { + if rm.clocksource == nil { + return clock.NewClock().NewTicker(interval) + } + return rm.clocksource.NewTicker(interval) + +} + +// Run is roleManager's main loop. On startup, it looks at every node object in the cluster and +// attempts to reconcile the raft member list with all the nodes' desired roles. If any nodes +// need to be demoted or promoted, it will add them to a reconciliation queue, and if any raft +// members' node have been deleted, it will add them to a removal queue. + +// These queues are processed immediately, and any nodes that failed to be processed are +// processed again in the next reconciliation interval, so that nodes will hopefully eventually +// be reconciled. As node updates come in, any promotions or demotions are also added to the +// reconciliation queue and reconciled. As node removals come in, they are added to the removal +// queue to be removed from the raft cluster. + +// Removal from a raft cluster is idempotent (and it's the only raft cluster change that will occur +// during reconciliation or removal), so it's fine if a node is in both the removal and reconciliation +// queues. + +// The ctx param is only used for logging. func (rm *roleManager) Run(ctx context.Context) { defer close(rm.doneChan) var ( - nodes []*api.Node - ticker *time.Ticker + nodes []*api.Node + + // ticker and tickerCh are used to time the reconciliation interval, which will + // periodically attempt to re-reconcile nodes that failed to reconcile the first + // time through + ticker clock.Ticker tickerCh <-chan time.Time ) @@ -56,37 +101,73 @@ func (rm *roleManager) Run(ctx context.Context) { nodes, err = store.FindNodes(readTx, store.All) return err }, - api.EventUpdateNode{}) + api.EventUpdateNode{}, + api.EventDeleteNode{}) defer cancelWatch() if err != nil { log.G(ctx).WithError(err).Error("failed to check nodes for role changes") } else { + // Assume all raft members have been deleted from the cluster, until the node list + // tells us otherwise. We can make this assumption because the node object must + // exist first before the raft member object. + + // Background life-cycle for a manager: it joins the cluster, getting a new TLS + // certificate. To get a TLS certificate, it makes an RPC call to the CA server, + // which on successful join adds its information to the cluster node list and + // eventually generates a TLS certificate for it. Once it has a TLS certificate, + // it can contact the other nodes, and makes an RPC call to request to join the + // raft cluster. The node it contacts will add the node to the raft membership. + for _, member := range rm.raft.GetMemberlist() { + rm.pendingRemoval[member.NodeID] = struct{}{} + } for _, node := range nodes { - rm.pending[node.ID] = node + // if the node exists, we don't want it removed from the raft membership cluster + // necessarily + delete(rm.pendingRemoval, node.ID) + + // reconcile each existing node + rm.pendingReconciliation[node.ID] = node rm.reconcileRole(ctx, node) } - if len(rm.pending) != 0 { - ticker = time.NewTicker(roleReconcileInterval) - tickerCh = ticker.C + for nodeID := range rm.pendingRemoval { + rm.evictRemovedNode(ctx, nodeID) + } + // If any reconciliations or member removals failed, we want to try again, so + // make sure that we start the ticker so we can try again and again every + // roleReconciliationInterval seconds until the queues are both empty. + if len(rm.pendingReconciliation) != 0 || len(rm.pendingRemoval) != 0 { + ticker = rm.getTicker(roleReconcileInterval) + tickerCh = ticker.C() } } for { select { case event := <-watcher: - node := event.(api.EventUpdateNode).Node - rm.pending[node.ID] = node - rm.reconcileRole(ctx, node) - if len(rm.pending) != 0 && ticker == nil { - ticker = time.NewTicker(roleReconcileInterval) - tickerCh = ticker.C + switch ev := event.(type) { + case api.EventUpdateNode: + rm.pendingReconciliation[ev.Node.ID] = ev.Node + rm.reconcileRole(ctx, ev.Node) + case api.EventDeleteNode: + rm.pendingRemoval[ev.Node.ID] = struct{}{} + rm.evictRemovedNode(ctx, ev.Node.ID) + } + // If any reconciliations or member removals failed, we want to try again, so + // make sure that we start the ticker so we can try again and again every + // roleReconciliationInterval seconds until the queues are both empty. + if (len(rm.pendingReconciliation) != 0 || len(rm.pendingRemoval) != 0) && ticker == nil { + ticker = rm.getTicker(roleReconcileInterval) + tickerCh = ticker.C() } case <-tickerCh: - for _, node := range rm.pending { + for _, node := range rm.pendingReconciliation { rm.reconcileRole(ctx, node) } - if len(rm.pending) == 0 { + for nodeID := range rm.pendingRemoval { + rm.evictRemovedNode(ctx, nodeID) + } + if len(rm.pendingReconciliation) == 0 && len(rm.pendingRemoval) == 0 { ticker.Stop() ticker = nil tickerCh = nil @@ -100,10 +181,57 @@ func (rm *roleManager) Run(ctx context.Context) { } } +// evictRemovedNode evicts a removed node from the raft cluster membership. This is to cover an edge case in which +// a node might have been removed, but somehow the role was not reconciled (possibly a demotion and a removal happened +// in rapid succession before the raft membership configuration went through). +func (rm *roleManager) evictRemovedNode(ctx context.Context, nodeID string) { + // Check if the member still exists in the membership + member := rm.raft.GetMemberByNodeID(nodeID) + if member != nil { + // We first try to remove the raft node from the raft cluster. On the next tick, if the node + // has been removed from the cluster membership, we then delete it from the removed list + rm.removeMember(ctx, member) + return + } + delete(rm.pendingRemoval, nodeID) +} + +// removeMember removes a member from the raft cluster membership +func (rm *roleManager) removeMember(ctx context.Context, member *membership.Member) { + // Quorum safeguard - quorum should have been checked before a node was allowed to be demoted, but if in the + // intervening time some other node disconnected, removing this node would result in a loss of cluster quorum. + // We leave it + if !rm.raft.CanRemoveMember(member.RaftID) { + // TODO(aaronl): Retry later + log.G(ctx).Debugf("can't demote node %s at this time: removing member from raft would result in a loss of quorum", member.NodeID) + return + } + + rmCtx, rmCancel := context.WithTimeout(rm.ctx, removalTimeout) + defer rmCancel() + + if member.RaftID == rm.raft.Config.ID { + // Don't use rmCtx, because we expect to lose + // leadership, which will cancel this context. + log.G(ctx).Info("demoted; transferring leadership") + err := rm.raft.TransferLeadership(context.Background()) + if err == nil { + return + } + log.G(ctx).WithError(err).Info("failed to transfer leadership") + } + if err := rm.raft.RemoveMember(rmCtx, member.RaftID); err != nil { + // TODO(aaronl): Retry later + log.G(ctx).WithError(err).Debugf("can't demote node %s at this time", member.NodeID) + } +} + +// reconcileRole looks at the desired role for a node, and if it is being demoted or promoted, updates the +// node role accordingly. If the node is being demoted, it also removes the node from the raft cluster membership. func (rm *roleManager) reconcileRole(ctx context.Context, node *api.Node) { if node.Role == node.Spec.DesiredRole { // Nothing to do. - delete(rm.pending, node.ID) + delete(rm.pendingReconciliation, node.ID) return } @@ -120,36 +248,16 @@ func (rm *roleManager) reconcileRole(ctx context.Context, node *api.Node) { if err != nil { log.G(ctx).WithError(err).Errorf("failed to promote node %s", node.ID) } else { - delete(rm.pending, node.ID) + delete(rm.pendingReconciliation, node.ID) } } else if node.Spec.DesiredRole == api.NodeRoleWorker && node.Role == api.NodeRoleManager { // Check for node in memberlist member := rm.raft.GetMemberByNodeID(node.ID) if member != nil { - // Quorum safeguard - if !rm.raft.CanRemoveMember(member.RaftID) { - // TODO(aaronl): Retry later - log.G(ctx).Debugf("can't demote node %s at this time: removing member from raft would result in a loss of quorum", node.ID) - return - } - - rmCtx, rmCancel := context.WithTimeout(rm.ctx, 5*time.Second) - defer rmCancel() - - if member.RaftID == rm.raft.Config.ID { - // Don't use rmCtx, because we expect to lose - // leadership, which will cancel this context. - log.G(ctx).Info("demoted; transferring leadership") - err := rm.raft.TransferLeadership(context.Background()) - if err == nil { - return - } - log.G(ctx).WithError(err).Info("failed to transfer leadership") - } - if err := rm.raft.RemoveMember(rmCtx, member.RaftID); err != nil { - // TODO(aaronl): Retry later - log.G(ctx).WithError(err).Debugf("can't demote node %s at this time", node.ID) - } + // We first try to remove the raft node from the raft cluster. On the next tick, if the node + // has been removed from the cluster membership, we then update the store to reflect the fact + // that it has been successfully demoted, and if that works, remove it from the pending list. + rm.removeMember(ctx, member) return } @@ -165,7 +273,7 @@ func (rm *roleManager) reconcileRole(ctx context.Context, node *api.Node) { if err != nil { log.G(ctx).WithError(err).Errorf("failed to demote node %s", node.ID) } else { - delete(rm.pending, node.ID) + delete(rm.pendingReconciliation, node.ID) } } } diff --git a/components/engine/vendor/github.com/docker/swarmkit/manager/scheduler/scheduler.go b/components/engine/vendor/github.com/docker/swarmkit/manager/scheduler/scheduler.go index 6d5b4e551b..9ee0b9e5c9 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/manager/scheduler/scheduler.go +++ b/components/engine/vendor/github.com/docker/swarmkit/manager/scheduler/scheduler.go @@ -74,6 +74,12 @@ func (s *Scheduler) setupTasksList(tx store.ReadTx) error { continue } + // Also ignore tasks that have not yet been assigned but desired state is beyond TaskStateRunning + // This can happen if you update, delete or scale down a service before its tasks were assigned. + if t.Status.State == api.TaskStatePending && t.DesiredState > api.TaskStateRunning { + continue + } + s.allTasks[t.ID] = t if t.NodeID == "" { s.enqueue(t) diff --git a/components/engine/vendor/github.com/docker/swarmkit/manager/state/store/memory.go b/components/engine/vendor/github.com/docker/swarmkit/manager/state/store/memory.go index e64565fae8..423f04cad3 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/manager/state/store/memory.go +++ b/components/engine/vendor/github.com/docker/swarmkit/manager/state/store/memory.go @@ -129,10 +129,10 @@ func (m *timedMutex) Lock() { // for which it was locked in a metric. func (m *timedMutex) Unlock() { unlockedTimestamp := m.lockedAt.Load() + m.lockedAt.Store(time.Time{}) m.Mutex.Unlock() lockedFor := time.Since(unlockedTimestamp.(time.Time)) storeLockDurationTimer.Update(lockedFor) - m.lockedAt.Store(time.Time{}) } func (m *timedMutex) LockedAt() time.Time { diff --git a/components/engine/vendor/github.com/docker/swarmkit/node/node.go b/components/engine/vendor/github.com/docker/swarmkit/node/node.go index ded2561d14..1209d6de06 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/node/node.go +++ b/components/engine/vendor/github.com/docker/swarmkit/node/node.go @@ -123,6 +123,9 @@ type Config struct { // PluginGetter provides access to docker's plugin inventory. PluginGetter plugingetter.PluginGetter + + // FIPS is a boolean stating whether the node is FIPS enabled + FIPS bool } // Node implements the primary node functionality for a member of a swarm @@ -609,6 +612,7 @@ waitPeer: CertIssuerPublicKey: issuer.PublicKey, CertIssuerSubject: issuer.Subject, }, + FIPS: n.config.FIPS, } // if a join address has been specified, then if the agent fails to connect // due to a TLS error, fail fast - don't keep re-trying to join