Skip to content

cli/command/volume: suppress err output in tests - #4104

Merged
thaJeztah merged 1 commit into
docker:masterfrom
thaJeztah:volume_tests_discard
Mar 21, 2023
Merged

cli/command/volume: suppress err output in tests#4104
thaJeztah merged 1 commit into
docker:masterfrom
thaJeztah:volume_tests_discard

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

These tests were deliberately producing errors as part of the test, but printing those errors could be confusing / make it more difficult to find actual test-failures.

Before this patch:

=== RUN TestVolumeCreateErrors
Error: conflicting options: either specify --name or provide positional arg, not both
Error: "create" requires at most 1 argument.
See 'create --help'.
Usage: create [OPTIONS] [VOLUME] [flags]
Create a volume
Error: error creating volume
--- PASS: TestVolumeCreateErrors (0.00s)
PASS

With this patch applied:

=== RUN TestVolumeCreateErrors
--- PASS: TestVolumeCreateErrors (0.00s)
PASS

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

These tests were deliberately producing errors as part of the test, but
printing those errors could be confusing / make it more difficult to find
actual test-failures.
Before this patch:
=== RUN TestVolumeCreateErrors
Error: conflicting options: either specify --name or provide positional arg, not both
Error: "create" requires at most 1 argument.
See 'create --help'.
Usage: create [OPTIONS] [VOLUME] [flags]
Create a volume
Error: error creating volume
--- PASS: TestVolumeCreateErrors (0.00s)
PASS
With this patch applied:
=== RUN TestVolumeCreateErrors
--- PASS: TestVolumeCreateErrors (0.00s)
PASS
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-commenter

codecov-commenter commented Mar 21, 2023

Copy link
Copy Markdown

Codecov Report

Merging #4104 (db827d5) into master (e60c748) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@ Coverage Diff @@## master #4104 +/- ##
=======================================
Coverage 59.14% 59.14% =======================================
Files 287 287 Lines 24741 24741 =======================================
Hits 14634 14634 Misses 9221 9221 Partials 886 886 

@thaJeztah
thaJeztah merged commit ac38a77 into docker:masterMar 21, 2023
@thaJeztah
thaJeztah deleted the volume_tests_discard branch March 21, 2023 15:42
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@thaJeztah@codecov-commenter@vvoland