зеркало из https://github.com/microsoft/docker.git
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:
Родитель
849816dd0f
Коммит
2cc2d059de
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче