test: remove 6 duplicate permission validation tests in compiler_tests#765
Merged
jamesadevine merged 1 commit intoMay 27, 2026
Conversation
The generic tests test_permissions_validation_fails_without_write_sc and test_permissions_validation_passes_with_write_sc already verify that: 1. Safe-outputs requiring write permissions fail compilation without write SC 2. Safe-outputs requiring write permissions succeed with write SC Removed 6 redundant tests that duplicate this validation for specific safe-outputs (update-wiki-page, create-wiki-page, update-work-item). These specific tests added no unique coverage - they only changed which safe-output was used in the front matter, but tested the exact same compiler validation logic. Tests removed: - test_update_wiki_page_requires_write_sc - test_update_wiki_page_compiles_with_write_sc - test_create_wiki_page_requires_write_sc - test_create_wiki_page_compiles_with_write_sc - test_update_work_item_requires_write_sc - test_update_work_item_compiles_with_write_sc Verification: - cargo test --test compiler_tests: all 108 tests pass ✅ - cargo clippy --all-targets --all-features: no warnings ✅ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Test Suite Reduction: tests/compiler_tests.rs
What was wrong
The generic permission validation tests
test_permissions_validation_fails_without_write_scandtest_permissions_validation_passes_with_write_scalready verify the compiler's behavior for all write-requiring safe-outputs:Six additional tests duplicated this exact validation for specific safe-outputs (update-wiki-page, create-wiki-page, update-work-item). These tests only changed which safe-output was used in the front matter — they provided no additional coverage of unique behavior.
Changes
test_update_wiki_page_requires_write_sctest_permissions_validation_fails_without_write_sctest_update_wiki_page_compiles_with_write_sctest_permissions_validation_passes_with_write_sctest_create_wiki_page_requires_write_sctest_permissions_validation_fails_without_write_sctest_create_wiki_page_compiles_with_write_sctest_permissions_validation_passes_with_write_sctest_update_work_item_requires_write_sctest_permissions_validation_fails_without_write_sctest_update_work_item_compiles_with_write_sctest_permissions_validation_passes_with_write_scVerification
cargo test --test compiler_tests: all 108 tests pass ✅cargo clippy --all-targets --all-features: no warnings ✅Impact