From e31086320ea0305e2cc70490160ee30480471680 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Thu, 18 Mar 2021 17:07:23 +0000 Subject: [PATCH] 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 --- integration-cli/docker_cli_network_unix_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go index eb9d46b34d..e52c1b409a 100644 --- a/integration-cli/docker_cli_network_unix_test.go +++ b/integration-cli/docker_cli_network_unix_test.go @@ -1696,9 +1696,6 @@ func (s *DockerNetworkSuite) TestDockerNetworkFlagAlias(c *testing.T) { output, status := dockerCmd(c, "run", "--rm", "--network=user", "--network-alias=foo", "busybox", "true") assert.Equal(c, status, 0, fmt.Sprintf("unexpected status code %d (%s)", status, output)) - output, status, _ = dockerCmdWithError("run", "--rm", "--net=user", "--network=user", "busybox", "true") - assert.Equal(c, status, 0, fmt.Sprintf("unexpected status code %d (%s)", status, output)) - output, status, _ = dockerCmdWithError("run", "--rm", "--network=user", "--net-alias=foo", "--network-alias=bar", "busybox", "true") assert.Equal(c, status, 0, fmt.Sprintf("unexpected status code %d (%s)", status, output)) }