Refactor: Use mockgen and improve test validation#1670
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1670 +/- ##
==========================================
- Coverage 66.12% 66.10% -0.02%
==========================================
Files 343 343
Lines 38778 38778
==========================================
- Hits 25643 25636 -7
- Misses 11147 11154 +7
Partials 1988 1988
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
aknysh
approved these changes
Oct 19, 2025
goruha
added a commit
that referenced
this pull request
Oct 19, 2025
…gha-cache * 'fix-gha-cache' of github.com:cloudposse/atmos: Isolate AWS env vars during authentication (#1654) Changes auto-committed by Conductor (#1670) Add global --chdir flag for changing working directory (#1644) Fix: Preserve exit codes from shell commands and workflows (#1660) fix: isolate golangci-lint custom build to prevent git corruption (#1666)
|
These changes were released in v1.195.0-rc.1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
storer.Storerwith a mock generated bymockgenininternal/exec/describe_affected_utils_test.go.internal/exec/template_funcs_test.goto more thoroughly validate theFuncMapand the returnedAtmosFuncsinstance.CLAUDE.mdwith mandatory guidelines for mock generation and testing production code paths.why
mockgenensures mocks are generated and updated automatically, reducing maintenance overhead.describe_affected_utils_test.gocontained 81 lines of hand-written mock code. This is replaced by a cleaner, generated mock. Thetemplate_funcs_test.gotest was trivial and has been expanded to provide more meaningful assertions.CLAUDE.mdnow explicitly mandates the use ofmockgenand emphasizes testing production code paths, preventing future occurrences of manual mocks and logic duplication in tests.references
closes #123