test: enhance unit test coverage across internal packages#28
Draft
test: enhance unit test coverage across internal packages#28
Conversation
- Add comprehensive tests for budgets client (70.7% coverage, up from 51.5%) - Add tests for policy resolver (76.0% coverage, up from 44.0%) - Add tests for cmd package (28.7% coverage, up from 14.7%) New test coverage includes: - Role assumption and budget parsing scenarios - Policy resolution with priority rules (account > tag > OU > default) - Account filtering by ID and Organizational Unit - AWS configuration loading - Banner printing and CLI flag validation - Error handling for AWS API calls - Concurrent access patterns Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
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.
Summary
Improve test coverage for three packages with low coverage:
internal/budgets,internal/cmd, andinternal/policy.Test Coverage Improvements
Changes
internal/budgets/client_test.go (+40 test cases, ~736 lines)
internal/cmd/root_test.go (+73 test cases, ~904 lines)
internal/policy/resolver_test.go (+72 test cases, ~1,644 lines)
Testing