-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
return err when stack name does not exist
Signed-off-by: allencloud <allen.sun@daocloud.io>
- Loading branch information
1 parent
bd37b83
commit 416613f
Showing
6 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// +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) | ||
|
||
stackArgs := append([]string{"remove", "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") | ||
} | ||
|
||
func (s *DockerSwarmSuite) TestStackTasks(c *check.C) { | ||
d := s.AddDaemon(c, true, true) | ||
|
||
stackArgs := append([]string{"tasks", "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") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters