Add Test Coverage#2
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds test coverage across CLI, config parsing/validation, GCP client wrappers, and the binary entrypoint, with small test seams added for command execution and GCP client construction.
Changes:
- Added injectable factory variables for CLI execution and GCP client constructors.
- Expanded unit tests for CLI commands, config loader/parser branches, Cloud Build/Run clients, and
main. - Updated the changelog for v0.2.3 test coverage changes.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/gcp/run.go | Adds a Cloud Run service-client factory seam. |
| internal/gcp/run_test.go | Adds constructor and close-path tests for RunClient. |
| internal/gcp/cloudbuild.go | Adds a Cloud Build API factory seam. |
| internal/gcp/cloudbuild_test.go | Adds constructor, build status, wait/no-wait, and metadata tests. |
| internal/config/loader_test.go | Expands external config validation and parsing error coverage. |
| internal/config/loader_internal_test.go | Expands internal parser and merge helper coverage. |
| internal/cli/root.go | Adds injectable root execution, stderr, and exit seams. |
| internal/cli/cli_test.go | Expands CLI command success/error/write-path coverage. |
| cmd/kdlctl/main.go | Adds an injectable CLI execution seam for testing main. |
| cmd/kdlctl/main_test.go | Adds main entrypoint coverage. |
| CHANGELOG.md | Documents the v0.2.3 test coverage update. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
djburkhart
commented
May 18, 2026
Owner
Author
djburkhart
left a comment
There was a problem hiding this comment.
This has my approval.
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.
Adds more test coverage.