add command docker stack services STACKNAME

Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4b21b411ecf4b43b16bdd7f4b78df8a362503724
Component: engine
This commit is contained in:
allencloud
2016-07-19 14:21:58 +08:00
parent 77d0030a64
commit 34b01d4562
5 changed files with 124 additions and 16 deletions
@@ -26,3 +26,13 @@ func (s *DockerSwarmSuite) TestStackTasks(c *check.C) {
c.Assert(err, checker.IsNil)
c.Assert(out, check.Equals, "Nothing found in stack: UNKNOWN_STACK\n")
}
func (s *DockerSwarmSuite) TestStackServices(c *check.C) {
d := s.AddDaemon(c, true, true)
stackArgs := append([]string{"services", "UNKNOWN_STACK"})
out, err := d.Cmd("stack", stackArgs...)
c.Assert(err, checker.IsNil)
c.Assert(out, check.Equals, "Nothing found in stack: UNKNOWN_STACK\n")
}