Browse code

integration-cli: TestUserDefinedNetworkConnectDisconnectAlias return on failure

Have the test return immediately if the test does not pass instead of
stuck in `top`.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>

Andrew Hsu authored on 2019/10/05 08:42:35
Showing 1 changed files
... ...
@@ -1537,7 +1537,7 @@ func (s *DockerSuite) TestUserDefinedNetworkConnectDisconnectAlias(c *testing.T)
1537 1537
 	assert.NilError(c, err)
1538 1538
 
1539 1539
 	// verify the alias option is rejected when running on predefined network
1540
-	out, _, err := dockerCmdWithError("run", "--rm", "--name=any", "--net-alias=any", "busybox:glibc", "top")
1540
+	out, _, err := dockerCmdWithError("run", "--rm", "--name=any", "--net-alias=any", "busybox:glibc", "true")
1541 1541
 	assert.Assert(c, err != nil, "out: %s", out)
1542 1542
 	assert.Assert(c, strings.Contains(out, runconfig.ErrUnsupportedNetworkAndAlias.Error()))
1543 1543
 	// verify the alias option is rejected when connecting to predefined network