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

opts: cleanup ParseEnvFile tests #5494

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

thaJeztah
Copy link
Member


  • Use gotest.tools for assertions
  • Check for expected error messages
  • Don't check for ErrBadKey errors, as it's not used as a sentinel error anywhere.
  • Use t.SetEnv() instead of depending on HOME being set
  • Use t.TempDir() for writing temporary files

- Use gotest.tools for assertions
- Check for expected error messages
- Don't check for ErrBadKey errors, as it's not used
  as a sentinel error anywhere.
- Use t.SetEnv() instead of depending on `HOME` being set
- Use t.TempDir() for writing temporary files

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.10%. Comparing base (30e9abb) to head (b129660).
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5494   +/-   ##
=======================================
  Coverage   60.10%   60.10%           
=======================================
  Files         345      345           
  Lines       23447    23447           
=======================================
  Hits        14092    14092           
  Misses       8381     8381           
  Partials      974      974           

@thaJeztah thaJeztah requested a review from a team October 3, 2024 13:04
@thaJeztah
Copy link
Member Author

Thx! I'll bring this one in; I was planning to deprecate the ErrBadKey error, so thought I'd first cleanup some of this (as it was checking for it)

@thaJeztah thaJeztah merged commit 7c85db6 into docker:master Oct 3, 2024
104 checks passed
@thaJeztah thaJeztah deleted the opts_test_cleanup branch October 3, 2024 13:36
Sign up for free to 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