Add test coverage for dependency touch points#336
Merged
Conversation
Add unit tests for functions that directly consume dependencies being updated by Dependabot PRs #330, #332, #333: - TestBuildGlamourStyle: verifies glamour ansi.StyleConfig is correctly built from Theme colors (document, heading, link, bold, HR colors) - TestClusterFromResponse: verifies OCM SDK cmv1.Cluster → ClusterInfo conversion (field mapping, display name from DomainPrefix+DNS, region, hypershift, CCS, cloud provider, nil-safety for optional fields) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #336 +/- ##
==========================================
+ Coverage 66.16% 66.40% +0.23%
==========================================
Files 50 50
Lines 8031 8031
==========================================
+ Hits 5314 5333 +19
+ Misses 2347 2327 -20
- Partials 370 371 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
TestBuildGlamourStyle— verifies glamouransi.StyleConfigis correctly built from Theme colors (document, heading, link, bold, horizontal rule colors, H1 background clearing, custom theme propagation)TestClusterFromResponse— verifies OCM SDKcmv1.Cluster→ClusterInfoconversion using the SDK builder API (field mapping, display name from DomainPrefix+DNS, region/hypershift/CCS extraction, cloud provider, nil-safety for optional fields)These tests cover the functions that directly consume the dependencies being updated by Dependabot PRs #330 (glamour), #332 (ocm-sdk-go), and #333 (ocm-common), ensuring breaking changes in those bumps are caught.
Test plan
make test-allpassesTestClusterFromResponseuses SDK builders (no real API calls)TestBuildGlamourStyleis pure function testing (no I/O)🤖 Generated with Claude Code