Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 10 commits into from
May 27, 2023

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented May 27, 2023

See individual commits for details

@codecov-commenter
Copy link

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.

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 <github@gone.nl>
Also reformat the test-table to easier see what fields are used for
each test in the table.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Also moving the comments into the test-tables.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Make sure we don't drop errors when cleaning up state before/after
tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Also moving the comments into the test-tables.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Make sure we don't drop errors when cleaning up state before/after
tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- 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 <github@gone.nl>
- 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 <github@gone.nl>
@thaJeztah thaJeztah marked this pull request as ready for review May 27, 2023 15:14
@thaJeztah
Copy link
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
10 checks passed
@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.

None yet

3 participants