[27.x backport] cli/command/container: set empty args in tests and discard output#5564
Merged
thaJeztah merged 2 commits intodocker:27.xfrom Oct 21, 2024
Conversation
Prevent some tests from failing when running from a pre-compiled testbinary, and discard output to make the output less noisy. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 3b38dc6) Signed-off-by: Austin Vazquez <macedonv@amazon.com>
=== RUN TestWaitExitOrRemoved
=== RUN TestWaitExitOrRemoved/normal-container
=== RUN TestWaitExitOrRemoved/give-me-exit-code-42
=== RUN TestWaitExitOrRemoved/i-want-a-wait-error
time="2024-10-13T18:48:14+02:00" level=error msg="Error waiting for container: removal failed"
=== RUN TestWaitExitOrRemoved/non-existent-container-id
time="2024-10-13T18:48:14+02:00" level=error msg="error waiting for container: no such container: non-existent-container-id"
--- PASS: TestWaitExitOrRemoved (0.00s)
--- PASS: TestWaitExitOrRemoved/normal-container (0.00s)
--- PASS: TestWaitExitOrRemoved/give-me-exit-code-42 (0.00s)
--- PASS: TestWaitExitOrRemoved/i-want-a-wait-error (0.00s)
--- PASS: TestWaitExitOrRemoved/non-existent-container-id (0.00s)
PASS
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 35d7b1a)
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 27.x #5564 +/- ##
=======================================
Coverage 58.65% 58.65%
=======================================
Files 345 345
Lines 29042 29042
=======================================
Hits 17035 17035
Misses 11036 11036
Partials 971 971 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Backports #5534 to 27.x branch
- How I did it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)