summaryrefslogtreecommitdiff
path: root/integration-cli
diff options
context:
space:
mode:
authorAaron Lehmann <aaron.lehmann@docker.com>2017-02-16 17:05:36 -0800
committerAaron Lehmann <aaron.lehmann@docker.com>2017-04-03 09:46:01 -0700
commit330a0035334871d92207b583c1c36d52a244753f (patch)
treee06b2a775d81068f8dad56c353d6a01df6308a1f /integration-cli
parent91c86c7e26c40ff3e422adcdd88d1649dd9dbc9b (diff)
downloaddocker-330a0035334871d92207b583c1c36d52a244753f.tar.gz
Synchronous service create and service update
Change "service create" and "service update" to wait until the creation or update finishes, when --detach=false is specified. Show progress bars for the overall operation and for each individual task (when there are a small enough number of tasks), unless "-q" / "--quiet" is specified. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Diffstat (limited to 'integration-cli')
-rw-r--r--integration-cli/docker_cli_service_create_test.go4
-rw-r--r--integration-cli/docker_cli_service_health_test.go4
-rw-r--r--integration-cli/docker_cli_swarm_test.go6
3 files changed, 7 insertions, 7 deletions
diff --git a/integration-cli/docker_cli_service_create_test.go b/integration-cli/docker_cli_service_create_test.go
index e37c34ca93..1ff9b482cf 100644
--- a/integration-cli/docker_cli_service_create_test.go
+++ b/integration-cli/docker_cli_service_create_test.go
@@ -16,7 +16,7 @@ import (
func (s *DockerSwarmSuite) TestServiceCreateMountVolume(c *check.C) {
d := s.AddDaemon(c, true, true)
- out, err := d.Cmd("service", "create", "--mount", "type=volume,source=foo,target=/foo,volume-nocopy", "busybox", "top")
+ out, err := d.Cmd("service", "create", "--detach=true", "--mount", "type=volume,source=foo,target=/foo,volume-nocopy", "busybox", "top")
c.Assert(err, checker.IsNil, check.Commentf(out))
id := strings.TrimSpace(out)
@@ -123,7 +123,7 @@ func (s *DockerSwarmSuite) TestServiceCreateWithSecretSourceTarget(c *check.C) {
func (s *DockerSwarmSuite) TestServiceCreateMountTmpfs(c *check.C) {
d := s.AddDaemon(c, true, true)
- out, err := d.Cmd("service", "create", "--mount", "type=tmpfs,target=/foo,tmpfs-size=1MB", "busybox", "sh", "-c", "mount | grep foo; tail -f /dev/null")
+ out, err := d.Cmd("service", "create", "--detach=true", "--mount", "type=tmpfs,target=/foo,tmpfs-size=1MB", "busybox", "sh", "-c", "mount | grep foo; tail -f /dev/null")
c.Assert(err, checker.IsNil, check.Commentf(out))
id := strings.TrimSpace(out)
diff --git a/integration-cli/docker_cli_service_health_test.go b/integration-cli/docker_cli_service_health_test.go
index f7500fa387..9aa619897e 100644
--- a/integration-cli/docker_cli_service_health_test.go
+++ b/integration-cli/docker_cli_service_health_test.go
@@ -31,7 +31,7 @@ func (s *DockerSwarmSuite) TestServiceHealthRun(c *check.C) {
c.Check(err, check.IsNil)
serviceName := "healthServiceRun"
- out, err := d.Cmd("service", "create", "--name", serviceName, imageName, "top")
+ out, err := d.Cmd("service", "create", "--detach=true", "--name", serviceName, imageName, "top")
c.Assert(err, checker.IsNil, check.Commentf(out))
id := strings.TrimSpace(out)
@@ -92,7 +92,7 @@ func (s *DockerSwarmSuite) TestServiceHealthStart(c *check.C) {
c.Check(err, check.IsNil)
serviceName := "healthServiceStart"
- out, err := d.Cmd("service", "create", "--name", serviceName, imageName, "top")
+ out, err := d.Cmd("service", "create", "--detach=true", "--name", serviceName, imageName, "top")
c.Assert(err, checker.IsNil, check.Commentf(out))
id := strings.TrimSpace(out)
diff --git a/integration-cli/docker_cli_swarm_test.go b/integration-cli/docker_cli_swarm_test.go
index 35582fbd31..c079a3ae2f 100644
--- a/integration-cli/docker_cli_swarm_test.go
+++ b/integration-cli/docker_cli_swarm_test.go
@@ -1611,13 +1611,13 @@ func (s *DockerSwarmSuite) TestSwarmServicePsMultipleServiceIDs(c *check.C) {
d := s.AddDaemon(c, true, true)
name1 := "top1"
- out, err := d.Cmd("service", "create", "--name", name1, "--replicas=3", "busybox", "top")
+ out, err := d.Cmd("service", "create", "--detach=true", "--name", name1, "--replicas=3", "busybox", "top")
c.Assert(err, checker.IsNil)
c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
id1 := strings.TrimSpace(out)
name2 := "top2"
- out, err = d.Cmd("service", "create", "--name", name2, "--replicas=3", "busybox", "top")
+ out, err = d.Cmd("service", "create", "--detach=true", "--name", name2, "--replicas=3", "busybox", "top")
c.Assert(err, checker.IsNil)
c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
id2 := strings.TrimSpace(out)
@@ -1680,7 +1680,7 @@ func (s *DockerSwarmSuite) TestSwarmServicePsMultipleServiceIDs(c *check.C) {
func (s *DockerSwarmSuite) TestSwarmPublishDuplicatePorts(c *check.C) {
d := s.AddDaemon(c, true, true)
- out, err := d.Cmd("service", "create", "--publish", "5005:80", "--publish", "5006:80", "--publish", "80", "--publish", "80", "busybox", "top")
+ out, err := d.Cmd("service", "create", "--detach=true", "--publish", "5005:80", "--publish", "5006:80", "--publish", "80", "--publish", "80", "busybox", "top")
c.Assert(err, check.IsNil, check.Commentf(out))
id := strings.TrimSpace(out)