1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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>
This commit is contained in:
Andrew Hsu 2019-10-04 23:42:35 +00:00
parent 9425487117
commit 7450f89f6c

View file

@ -1537,7 +1537,7 @@ func (s *DockerSuite) TestUserDefinedNetworkConnectDisconnectAlias(c *testing.T)
assert.NilError(c, err)
// verify the alias option is rejected when running on predefined network
out, _, err := dockerCmdWithError("run", "--rm", "--name=any", "--net-alias=any", "busybox:glibc", "top")
out, _, err := dockerCmdWithError("run", "--rm", "--name=any", "--net-alias=any", "busybox:glibc", "true")
assert.Assert(c, err != nil, "out: %s", out)
assert.Assert(c, strings.Contains(out, runconfig.ErrUnsupportedNetworkAndAlias.Error()))
// verify the alias option is rejected when connecting to predefined network