test: parametrize error paths across system read tools - #311
Merged
Conversation
Cover the auth-error and unconfigured paths for all twelve system read tools instead of only unraid_get_info and unraid_get_registration, and assert the parametrized list matches the tools register_system_tools actually registers so a new tool cannot skip the coverage. Drops the per-tool auth and unconfigured cases the parametrization now subsumes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Error-path coverage for the system read tools was uneven: only
unraid_get_infoandunraid_get_registrationhad an auth-error test, and onlyunraid_get_infohad an unconfigured test.This parametrizes both error paths across all twelve system read tools (
get_info,get_flash,get_registration,get_connect,get_network,get_cloud,list_services,get_display_settings,get_api_settings,get_system_time,list_timezone_options,get_vars):ToolErrormatching "Authentication failed", and the tool is asserted to have awaited its corresponding client methodToolErrormatching "Unraid API not configured"A guard test asserts the parametrized list equals the read tools
register_system_toolsactually registers, so a newly added system read tool cannot skip the coverage. It compares against the non-write-tagged subset, since a write tool added to this module would need write-mode gating rather than these read fixtures.The per-tool auth and unconfigured tests the parametrization subsumes are removed.
Test-only change; no source files are touched.
Closes #294
🤖 Generated with Claude Code