Modify network plugin test for swarm-mode

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal 2017-01-10 16:13:38 -08:00 committed by Aaron Lehmann
parent 18fd3885c6
commit c8083e8735

View file

@ -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