Add remove flags for service update

with unit tests

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: dc33fc1ff433fcc70efc22f5cea9b87c6ec64a3b
Component: engine
This commit is contained in:
Daniel Nephin
2016-07-13 16:06:25 -04:00
parent 5ae05f5a48
commit 61271c6fdb
4 changed files with 187 additions and 41 deletions
@@ -22,7 +22,7 @@ func (s *DockerSwarmSuite) TestServiceUpdatePort(c *check.C) {
waitAndAssert(c, defaultReconciliationTimeout, d.checkActiveContainerCount, checker.Equals, 1)
// Update the service: changed the port mapping from 8080:8081 to 8082:8083.
_, err = d.Cmd("service", "update", "-p", "8082:8083", serviceName)
_, err = d.Cmd("service", "update", "-p", "8082:8083", "--remove-publish", "8081", serviceName)
c.Assert(err, checker.IsNil)
// Inspect the service and verify port mapping