[Tests] Add config help and plugin registry coverage#91
Merged
Conversation
Contributor
Code Coverage Analysis🟡 Overall Coverage: 82.3% Project coverage remains at 82.3% (3.0K/3.6K statements) Changes: 2 test files Coverage Metrics
Coverage Breakdown
ResourcesGenerated via go-coverage • 2025-12-28 19:32:37 UTC |
Refactor assertions in plugin loading tests for better readability and consistency.
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.
Motivation
ValidationError.Error,GetConfigHelp,stripComments) to ensure helpful diagnostics.Registry.LoadPluginsto catch edge cases.Description
internal/config/config_help_test.gowhich testsValidationError.Error,GetConfigHelp,stripComments, andgetStringEnvcomment-stripping behavior.internal/checks/registry_plugins_test.gowhich testsRegistry.LoadPluginsfor the no-registry case, successful plugin loading from a directory, and propagation of plugin load errors.testify/require, table-driven style where appropriate) and do not change production code.Testing
magex testandmagex test:cover, which executed the new tests (new tests passed) but the overall test run failed due to unrelated pre-existing failures in other packages (notablycmd/go-pre-commit/cmdplugin tests, builtin EOF/whitespace permission cases, and git installer tests).internal/configandinternal/checksexercised the added tests and increased coverage for the targeted functions.Codex Task