test: fix vacuous assertions in src/execute.rs#1648
Draft
github-actions[bot] wants to merge 1 commit into
Draft
Conversation
Upgrade 5 bare is_err() assertions to check the error message, following the pattern established in previous test-reducer runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
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.
Test Suite Reduction:
src/execute.rsWhat was wrong
Five tests asserted only
assert!(result.is_err())with no check on the error message. These tests would pass even if the implementation returned a completely different error — e.g., a panic, a wrong validation path, or a deserialization failure from an unrelated field. They verify that some error is returned, but not why.Changes
test_execute_safe_output_malformed_work_item_returns_erris_err()— upgraded to check"Failed to parse create-work-item"test_execute_malformed_update_wiki_page_returns_erris_err()— upgraded to check"Failed to parse update-wiki-page"test_execute_malformed_create_wiki_page_returns_erris_err()— upgraded to check"Failed to parse create-wiki-page"test_execute_malformed_upload_pipeline_artifact_returns_erris_err()— upgraded to check"Failed to parse upload-pipeline-artifact"test_execute_malformed_comment_on_work_item_returns_erris_err()— upgraded to check"Failed to parse comment-on-work-item"The error message
"Failed to parse <tool-name>"is the literal string emitted bydispatch_toolinexecute.rswhenserde_json::from_valuefails for missing required fields. Pinning this text ensures a regression in the tool name, parsing path, or error propagation would surface immediately.Verification
cargo test: all 2580 tests pass ✅cargo clippy --all-targets --all-features: no errors or new warnings ✅Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comSee Network Configuration for more information.