Skip to content

[27.x backport] opts: cleanup ParseEnvFile tests - #5499

Merged
thaJeztah merged 1 commit into
docker:27.xfrom
austinvazquez:cherry-pick-b129660dd39f566c6cdc692467a99bb422001a98-to-27.x
Oct 4, 2024
Merged

[27.x backport] opts: cleanup ParseEnvFile tests#5499
thaJeztah merged 1 commit into
docker:27.xfrom
austinvazquez:cherry-pick-b129660dd39f566c6cdc692467a99bb422001a98-to-27.x

Conversation

@austinvazquez

Copy link
Copy Markdown
Contributor

- What I did

  • 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

(cherry picked from commit b129660)

- How I did it

git cherry-pick -xsS b129660dd39f566c6cdc692467a99bb422001a98

- How to verify it

- Description for the changelog

n/a

- A picture of a cute animal (not mandatory but encouraged)

- 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>
(cherry picked from commit b129660)
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
@codecov-commenter

codecov-commenter commented Oct 4, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.78%. Comparing base (fbd51c0) to head (19279c9).
Report is 7 commits behind head on 27.x.

Additional details and impacted files
@@ Coverage Diff @@## 27.x #5499 +/- ##
=======================================
Coverage 59.78% 59.78% =======================================
Files 345 345 Lines 23442 23442 =======================================
Hits 14015 14015 Misses 8453 8453 Partials 974 974 

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@thaJeztah
thaJeztah merged commit 4c5eb4c into docker:27.xOct 4, 2024
@austinvazquez
austinvazquez deleted the cherry-pick-b129660dd39f566c6cdc692467a99bb422001a98-to-27.x branch October 4, 2024 13:16
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.

4 participants

@austinvazquez@codecov-commenter@thaJeztah@laurazard