Update TestSwarmNetworkPlugin test

This commit updates TestSwarmNetworkPlugin, similiar to
changes in https://github.com/docker/docker/pull/30332

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang 2017-01-29 10:57:58 -08:00
Родитель 849816dd0f
Коммит 2cc2d059de
1 изменённых файлов: 2 добавлений и 11 удалений

Просмотреть файл

@ -670,17 +670,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")
c.Assert(err, checker.NotNil)
c.Assert(out, checker.Contains, "not supported in swarm mode")
}
// Test case for #24712