From 029770595d52dcf0bac3b933432a9b85b0a587b7 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 16 Nov 2025 21:21:56 +0100 Subject: [PATCH] integration-cli: remove TestVolumeCLINoArgs This test was only testing behavior of the CLI itself (or even basic functionality provided by Cobra). Signed-off-by: Sebastiaan van Stijn --- integration-cli/docker_cli_volume_test.go | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/integration-cli/docker_cli_volume_test.go b/integration-cli/docker_cli_volume_test.go index ac932ea77a..77c1099cda 100644 --- a/integration-cli/docker_cli_volume_test.go +++ b/integration-cli/docker_cli_volume_test.go @@ -223,29 +223,6 @@ func (s *DockerCLIVolumeSuite) TestVolumeCLIRm(c *testing.T) { assert.Assert(c, exec.Command("volume", "rm", "doesnotexist").Run() != nil, "volume rm should fail with non-existent volume") } -// FIXME(vdemeester) should be a unit test in cli/command/volume package -func (s *DockerCLIVolumeSuite) TestVolumeCLINoArgs(c *testing.T) { - out := cli.DockerCmd(c, "volume").Combined() - // no args should produce the cmd usage output - usage := "docker volume COMMAND --help" - assert.Assert(c, is.Contains(out, usage)) - // invalid arg should error and show the command usage on stderr - icmd.RunCommand(dockerBinary, "volume", "somearg").Assert(c, icmd.Expected{ - ExitCode: 1, - Error: "exit status 1", - Err: usage, - }) - - // invalid flag should error and show the flag error and cmd usage - result := icmd.RunCommand(dockerBinary, "volume", "--no-such-flag") - result.Assert(c, icmd.Expected{ - ExitCode: 125, - Error: "exit status 125", - Err: usage, - }) - assert.Assert(c, is.Contains(result.Stderr(), "unknown flag: --no-such-flag")) -} - func (s *DockerCLIVolumeSuite) TestVolumeCLIInspectTmplError(c *testing.T) { name := cli.DockerCmd(c, "volume", "create").Stdout() name = strings.TrimSpace(name)