Skip to content

test: parametrize error paths across system read tools - #311

Merged
millsmillsymills merged 2 commits into
mainfrom
issue-294-error-path-coverage
Aug 3, 2026
Merged

test: parametrize error paths across system read tools#311
millsmillsymills merged 2 commits into
mainfrom
issue-294-error-path-coverage

Conversation

@millsmillsymills

Copy link
Copy Markdown
Collaborator

Error-path coverage for the system read tools was uneven: only unraid_get_info and unraid_get_registration had an auth-error test, and only unraid_get_info had 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):

  • an auth failure raised by the client surfaces as a ToolError matching "Authentication failed", and the tool is asserted to have awaited its corresponding client method
  • calling a tool with no API key configured surfaces as a ToolError matching "Unraid API not configured"

A guard test asserts the parametrized list equals the read tools register_system_tools actually 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

millsmillsymills and others added 2 commits August 3, 2026 12:46
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>
@millsmillsymills
millsmillsymills merged commit d8af583 into main Aug 3, 2026
11 checks passed
@millsmillsymills
millsmillsymills deleted the issue-294-error-path-coverage branch August 3, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Parametrize error-path coverage across all system read tools

1 participant