Skip to content

test: fix vacuous assertion in queue_build test#1546

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
test-reducer/queue-build-vacuous-minimal-params-8759b19bbcf0e6b9
Draft

test: fix vacuous assertion in queue_build test#1546
github-actions[bot] wants to merge 1 commit into
mainfrom
test-reducer/queue-build-vacuous-minimal-params-8759b19bbcf0e6b9

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Test Suite Reduction: src/safe_outputs/queue_build.rs

What was wrong

  • test_validation_accepts_minimal_params: the test called params.try_into() and only asserted is_ok() — it verified that conversion didn't fail but never checked the content of the result. This means a regression where the conversion produced wrong values (e.g. wrong name or corrupted pipeline_id) would silently pass.

Changes

Test Action Reason
test_validation_accepts_minimal_params Rewritten Vacuous is_ok() assertion replaced with content checks

The fix unwraps the result and asserts:

  • result.name == "queue-build" — verifies the tool_result! macro wires the name correctly
  • result.pipeline_id == 1 — verifies the field is preserved through conversion
  • result.branch.is_none() — verifies None inputs survive
  • result.reason.is_none() — same

Verification

  • cargo test safe_outputs::queue_build::tests: all 12 tests pass ✅
  • cargo check: clean ✅

Generated by Test Reducer · 220 AIC · ⌖ 11.7 AIC · ⊞ 8.7K ·

test_validation_accepts_minimal_params only checked is_ok() without
verifying the result content. Strengthen it to assert on name,
pipeline_id, branch, and reason — the properties that should be
preserved verbatim by the infallible conversion path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants