[codex] improve unit test coverage#600
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #600 +/- ##
==========================================
+ Coverage 67.43% 70.83% +3.40%
==========================================
Files 53 53
Lines 5644 5644
==========================================
+ Hits 3806 3998 +192
+ Misses 1612 1418 -194
- Partials 226 228 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR focuses on improving confidence in confd by expanding unit test coverage across the reload manager, metrics health endpoints, and multiple backend detailed health checks, while also adding explicit Make targets for unit, coverage, and race testing.
Changes:
- Added Makefile targets for
unit,coverage, andracetest workflows. - Added/expanded tests for reload notifications and non-blocking reload triggers.
- Expanded detailed health check test coverage across metrics and several backends (Env, DynamoDB, SSM, Secrets Manager, and shared types).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Makefile | Adds explicit unit, coverage, and race targets for testing workflows. |
| pkg/service/reload_test.go | New tests validating reload manager subscription behavior and non-blocking triggers under concurrency. |
| pkg/metrics/health_test.go | Adds coverage for ReadyDetailedHandler success/error paths and fallback behavior. |
| pkg/metrics/backend_test.go | Adds tests for instrumented detailed health checks and Close() delegation behavior. |
| pkg/backends/types/noop_test.go | Adds JSON marshaling coverage for DurationMillis. |
| pkg/backends/env/client_test.go | Adds HealthCheckDetailed coverage for the env backend. |
| pkg/backends/dynamodb/client_test.go | Adds HealthCheckDetailed success/error test coverage for DynamoDB backend. |
| pkg/backends/ssm/client_test.go | Adds HealthCheckDetailed success/error test coverage for SSM backend. |
| pkg/backends/secretsmanager/client_test.go | Adds HealthCheckDetailed success/error test coverage for Secrets Manager backend. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,4 +1,4 @@ | |||
| .PHONY: build install clean lint test integration dep release | |||
| .PHONY: build install clean lint test unit coverage race integration dep release | |||
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
Testing
Notes
Coverage across ./pkg/... improved from 76.0% to 78.7%.