Skip to content

opts: cleanup ParseEnvFile tests - #5494

Merged
thaJeztah merged 1 commit into
docker:masterfrom
thaJeztah:opts_test_cleanup
Oct 3, 2024
Merged

opts: cleanup ParseEnvFile tests#5494
thaJeztah merged 1 commit into
docker:masterfrom
thaJeztah:opts_test_cleanup

Conversation

@thaJeztah

Copy link
Copy Markdown
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 <github@gone.nl>
@codecov-commenter

codecov-commenter commented Oct 3, 2024

Copy link
Copy Markdown

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 teamOctober 3, 2024 13:04
@thaJeztah

Copy link
Copy Markdown
MemberAuthor

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)

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@robmry