Modify network plugin test for swarm-mode
Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
parent
18fd3885c6
commit
c8083e8735
1 changed files with 2 additions and 12 deletions
|
@ -677,18 +677,8 @@ func (s *DockerSwarmSuite) TestSwarmNetworkPlugin(c *check.C) {
|
|||
|
||||
d := s.AddDaemon(c, true, true)
|
||||
|
||||
out, err := d.Cmd("network", "create", "-d", globalNetworkPlugin, "foo")
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
|
||||
|
||||
name := "top"
|
||||
out, err = d.Cmd("service", "create", "--name", name, "--network", "foo", "busybox", "top")
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
|
||||
|
||||
out, err = d.Cmd("service", "inspect", "--format", "{{range .Spec.Networks}}{{.Target}}{{end}}", name)
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(strings.TrimSpace(out), checker.Equals, "foo")
|
||||
_, err := d.Cmd("network", "create", "-d", globalNetworkPlugin, "foo")
|
||||
c.Assert(err, checker.NotNil)
|
||||
}
|
||||
|
||||
// Test case for #24712
|
||||
|
|
Loading…
Reference in a new issue