Conversation
- Added tests for MapToolConfig.GetAny (0% → 100% coverage) - Added tests for getTypeString (54.5% → 100% coverage) - Added tests for writeArgsToYAMLInline (33.3% → 100% coverage) All three utility functions now have complete test coverage with edge cases including nil values, empty collections, special characters, and type variants.
Contributor
Author
|
Agentic Changeset Generator triggered by this pull request. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive unit tests for MCP configuration utility functions in the workflow package. The tests ensure proper functionality of type handling, configuration access, and YAML argument formatting.
- Adds test coverage for
MapToolConfig.GetAny()method with various data types - Adds test coverage for
getTypeString()helper function with all supported and edge case types - Adds test coverage for
writeArgsToYAMLInline()function including special character handling
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
This PR adds comprehensive unit tests for three utility functions in
pkg/workflow/that previously had low or zero coverage.Changes Made
New Test File
pkg/workflow/mcp_config_utils_test.go- 302 lines with 3 test functions covering:TestMapToolConfig_GetAny(8 test cases)TestGetTypeString(17 test cases)TestWriteArgsToYAMLInline(9 test cases)Test Coverage Results
Replicating the Test Coverage Measurements
Expected output shows all three functions improving to 100.0% coverage.
Problems Found
None - these are pure utility functions with straightforward logic.
Actions Taken
make fmtFuture Improvement Areas
Based on current coverage analysis, the following areas have low/partial coverage:
Zero Coverage Functions (0%):
pkg/cli/add_command.go- Workflow addition commandspkg/cli/audit.go- Audit command implementationspkg/cli/interactive.go- Interactive promptsLow Coverage Functions (< 30%):
pkg/cli/remove_command.go:RemoveWorkflows()(5.3%)pkg/workflow/compiler_jobs.go:buildCustomJobs()(7.1%)pkg/cli/run_command.go:RunWorkflowOnGitHub()(8.7%)pkg/workflow/validation.go:collectPackagesFromWorkflow()(29.7%)📋 Full Command History
Bash Commands Run
Web Searches Performed
None
Web Pages Fetched
None