Skip to content

test: remove vacuous guard tests and duplicate URL-encoding tests in wiki safe outputs#844

Merged
jamesadevine merged 1 commit into
mainfrom
test/reduce-wiki-guard-tests-c39661c5f4ee232e
Jun 3, 2026
Merged

test: remove vacuous guard tests and duplicate URL-encoding tests in wiki safe outputs#844
jamesadevine merged 1 commit into
mainfrom
test/reduce-wiki-guard-tests-c39661c5f4ee232e

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 3, 2026

Test Suite Reduction: wiki safe outputs

What was wrong

  • create_wiki_page.rs::test_page_already_exists_guard_returns_failure: Constructs a local if page_exists { ... } else { None } conditional inline and asserts on that local value — never calls execute_impl or any production code. The doc-comment even says explicitly: "if the guard were accidentally removed from execute_impl, this test would still pass."
  • create_wiki_page.rs::test_new_page_passes_guard: Same vacuous pattern (page_exists = false, local conditional, assert!(result.is_none())).
  • update_wiki_page.rs::test_page_not_found_guard_returns_failure: Same pattern as above.
  • update_wiki_page.rs::test_existing_page_passes_guard: Same pattern.
  • update_wiki_page.rs — 4× test_path_segment_* tests: Exact duplicates of identical tests already present in create_wiki_page.rs. Both modules import the same PATH_SEGMENT constant from super::, so these tests cover no additional code paths.

Changes

Test File Action Reason
test_page_already_exists_guard_returns_failure create_wiki_page.rs Removed Vacuous — tests locally-constructed conditional, not production code
test_new_page_passes_guard create_wiki_page.rs Removed Vacuous — same pattern
test_page_not_found_guard_returns_failure update_wiki_page.rs Removed Vacuous — same pattern
test_existing_page_passes_guard update_wiki_page.rs Removed Vacuous — same pattern
test_path_segment_encodes_fragment_delimiter update_wiki_page.rs Removed Duplicate of identical test in create_wiki_page.rs
test_path_segment_encodes_query_delimiter update_wiki_page.rs Removed Duplicate
test_path_segment_encodes_space update_wiki_page.rs Removed Duplicate
test_path_segment_does_not_encode_safe_chars update_wiki_page.rs Removed Duplicate

Verification

  • cargo test: all 1751 unit tests + all integration tests pass, 0 failed ✅
  • cargo clippy --all-targets --all-features: no warnings or errors ✅

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • spsprodeus21.vssps.visualstudio.com
  • spsprodweu4.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "spsprodeus21.vssps.visualstudio.com"
    - "spsprodweu4.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by Test Reducer · sonnet46 2.5M ·

…wiki safe outputs

- create_wiki_page.rs: remove test_page_already_exists_guard_returns_failure and
  test_new_page_passes_guard — both tests construct a local if/else conditional
  inline and assert on the result; they never call execute_impl or any production
  code. The doc-comments themselves note 'if the guard were accidentally removed
  from execute_impl, this test would still pass.'
- update_wiki_page.rs: remove test_page_not_found_guard_returns_failure and
  test_existing_page_passes_guard — same vacuous pattern.
- update_wiki_page.rs: remove test_path_segment_encodes_fragment_delimiter,
  test_path_segment_encodes_query_delimiter, test_path_segment_encodes_space,
  test_path_segment_does_not_encode_safe_chars — identical copies of the same
  four tests already present in create_wiki_page.rs; both modules use the same
  PATH_SEGMENT constant from super::.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review June 3, 2026 19:56
@jamesadevine jamesadevine merged commit 87d5f1d into main Jun 3, 2026
@jamesadevine jamesadevine deleted the test/reduce-wiki-guard-tests-c39661c5f4ee232e branch June 3, 2026 19:56
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.

1 participant