From 2cc2d059ded77c4c5afa6704194cae5bc0c64cf5 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Sun, 29 Jan 2017 10:57:58 -0800 Subject: [PATCH] Update TestSwarmNetworkPlugin test This commit updates TestSwarmNetworkPlugin, similiar to changes in https://github.com/docker/docker/pull/30332 Signed-off-by: Yong Tang --- integration-cli/docker_cli_swarm_test.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/integration-cli/docker_cli_swarm_test.go b/integration-cli/docker_cli_swarm_test.go index 67a38c82c3..5f1a662761 100644 --- a/integration-cli/docker_cli_swarm_test.go +++ b/integration-cli/docker_cli_swarm_test.go @@ -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