Skip to content

rewrite tests to use sub-tests, improve error-handling in tests, and use t.Cleanup()#275

Merged
thaJeztah merged 10 commits intodocker:masterfrom
thaJeztah:subtests
May 27, 2023
Merged

rewrite tests to use sub-tests, improve error-handling in tests, and use t.Cleanup()#275
thaJeztah merged 10 commits intodocker:masterfrom
thaJeztah:subtests

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented May 27, 2023

See individual commits for details

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 27, 2023

Codecov Report

Patch coverage: 57.14% and project coverage change: -0.20 ⚠️

Comparison is base (9ff5b61) 55.55% compared to head (59cb6ec) 55.35%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #275      +/-   ##
==========================================
- Coverage   55.55%   55.35%   -0.20%     
==========================================
  Files           9        9              
  Lines         666      672       +6     
==========================================
+ Hits          370      372       +2     
- Misses        253      257       +4     
  Partials       43       43              
Impacted Files Coverage Δ
osxkeychain/osxkeychain_darwin.go 69.29% <57.14%> (-1.79%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

thaJeztah added 10 commits May 27, 2023 17:14
Mostly for my own sanity; just about every repository we have
started to converge to using "tc" as variable name for this, so
updating this repository as well to help reduce cognitive load.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Also reformat the test-table to easier see what fields are used for
each test in the table.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Also moving the comments into the test-tables.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Make sure we don't drop errors when cleaning up state before/after
tests.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Also moving the comments into the test-tables.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Make sure we don't drop errors when cleaning up state before/after
tests.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
- don't fail tests early if there's more we can test
- don't user un-keyed literals in tests

Signed-off-by: Sebastiaan van Stijn <[email protected]>
- use consts for fixed values in tests
- don't fail tests early if there's more we can test

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah marked this pull request as ready for review May 27, 2023 15:14
@thaJeztah
Copy link
Copy Markdown
Member Author

This one should be ready for review now as well; @crazy-max PTAL ❤️

@thaJeztah thaJeztah merged commit f8e94d9 into docker:master May 27, 2023
@thaJeztah thaJeztah deleted the subtests branch May 27, 2023 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants