2016-06-28 13:39:49 -04:00
|
|
|
// +build experimental
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/docker/docker/pkg/integration/checker"
|
|
|
|
"github.com/go-check/check"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (s *DockerSwarmSuite) TestStackRemove(c *check.C) {
|
|
|
|
d := s.AddDaemon(c, true, true)
|
|
|
|
|
2016-07-22 12:14:05 -04:00
|
|
|
stackArgs := append([]string{"stack", "remove", "UNKNOWN_STACK"})
|
2016-06-28 13:39:49 -04:00
|
|
|
|
2016-07-22 12:14:05 -04:00
|
|
|
out, err := d.Cmd(stackArgs...)
|
2016-06-28 13:39:49 -04:00
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
|
c.Assert(out, check.Equals, "Nothing found in stack: UNKNOWN_STACK\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *DockerSwarmSuite) TestStackTasks(c *check.C) {
|
|
|
|
d := s.AddDaemon(c, true, true)
|
|
|
|
|
2016-07-22 12:14:05 -04:00
|
|
|
stackArgs := append([]string{"stack", "ps", "UNKNOWN_STACK"})
|
2016-06-28 13:39:49 -04:00
|
|
|
|
2016-07-22 12:14:05 -04:00
|
|
|
out, err := d.Cmd(stackArgs...)
|
2016-06-28 13:39:49 -04:00
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
|
c.Assert(out, check.Equals, "Nothing found in stack: UNKNOWN_STACK\n")
|
|
|
|
}
|
2016-07-01 22:12:16 -04:00
|
|
|
|
|
|
|
func (s *DockerSwarmSuite) TestStackServices(c *check.C) {
|
|
|
|
d := s.AddDaemon(c, true, true)
|
|
|
|
|
2016-07-22 12:14:05 -04:00
|
|
|
stackArgs := append([]string{"stack", "services", "UNKNOWN_STACK"})
|
2016-07-01 22:12:16 -04:00
|
|
|
|
2016-07-22 12:14:05 -04:00
|
|
|
out, err := d.Cmd(stackArgs...)
|
2016-07-01 22:12:16 -04:00
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
|
c.Assert(out, check.Equals, "Nothing found in stack: UNKNOWN_STACK\n")
|
|
|
|
}
|