Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 8033003

Browse files
committed
Remove cli test for duplicate --net/--network opts
This seems to be testing a strange case, specifically that one can set the `--net` and `--network` in the same command with the same network. Indeed this used to work with older CLIs but newer ones error out when validating the request before sending it to the daemon. Opening this for discussion because: 1. This doesn't seem to be testing anything at all related to the rest of the test 2. Not really providing any value here. 3. Is testing that a technically invalid option is successful (whether the option should be valid as it relates to the CLI accepting it is debatable). 4. Such a case seems fringe and even a bug in whatever is calling the CLI with such options. Signed-off-by: Brian Goff <[email protected]> Upstream-commit: e31086320ea0305e2cc70490160ee30480471680 Component: engine
1 parent 481f4f9 commit 8033003

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

components/engine/integration-cli/docker_cli_network_unix_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,9 +1696,6 @@ func (s *DockerNetworkSuite) TestDockerNetworkFlagAlias(c *testing.T) {
16961696
output, status := dockerCmd(c, "run", "--rm", "--network=user", "--network-alias=foo", "busybox", "true")
16971697
assert.Equal(c, status, 0, fmt.Sprintf("unexpected status code %d (%s)", status, output))
16981698

1699-
output, status, _ = dockerCmdWithError("run", "--rm", "--net=user", "--network=user", "busybox", "true")
1700-
assert.Equal(c, status, 0, fmt.Sprintf("unexpected status code %d (%s)", status, output))
1701-
17021699
output, status, _ = dockerCmdWithError("run", "--rm", "--network=user", "--net-alias=foo", "--network-alias=bar", "busybox", "true")
17031700
assert.Equal(c, status, 0, fmt.Sprintf("unexpected status code %d (%s)", status, output))
17041701
}

0 commit comments

Comments
 (0)