You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: add adversarial coverage for get_pause_state - #1289
This PR adds focused adversarial test coverage for the get_pause_state contract exposed by src/lib.rs. The new tests exercise the happy path, boundary/edge inputs, unauthorized callers, and verify that state remains unchanged after rejected operations.
Related Issue
Changes
🧪 Adversarial Coverage for get_pause_state
[ADD]src/test_pause_tiers.rs
Focused test module targeting get_pause_state in src/lib.rs.
Covers valid calls returning the expected pause state.
Covers boundary and invalid env: Env inputs to make error behavior observable and deterministic.
Covers unauthorized caller paths where the contract enforces authorization.
Asserts that state is unchanged after each rejected operation.
Verification Results
cargo test --test test_pause_tiers
✅ focused tests passed
cargo test
✅ surrounding suite passed
cargo clippy --all-targets -- -D warnings
✅ no warnings
cargo build
✅ build succeeded
Acceptance Criteria
Status
Cover the named behavior with focused automated tests, including the relevant success and failure paths
✅ Valid, boundary, and unauthorized paths covered in src/test_pause_tiers.rs
Preserve the existing public contract unless the change includes an explicit compatibility plan
✅ No changes to src/lib.rs; tests only
Make error and boundary behavior observable and deterministic
✅ Rejected operations assert explicit error outcomes and unchanged state
@RevoraOrg Quick CI status: the only red check on this PR is Format check (cargo fmt) (head run). That same check fails identically on master at 553e737e8037babab31c9f310e71bd1e0e6edc1d (base run), so this PR cannot go green without an unrelated upstream cargo fmt repair on master.
The PR itself is otherwise ready: Clippy lint check and Event-sunset table validation pass, and Build and test is only skipped because it needs: [fmt]. No code changes made here — flagging so the blocker is clear on the base branch rather than this PR. Happy to rebase/format once master is formatted.
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
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.
Overview
This PR adds focused adversarial test coverage for the
get_pause_statecontract exposed bysrc/lib.rs. The new tests exercise the happy path, boundary/edge inputs, unauthorized callers, and verify that state remains unchanged after rejected operations.Related Issue
Changes
🧪 Adversarial Coverage for
get_pause_statesrc/test_pause_tiers.rsget_pause_stateinsrc/lib.rs.env: Envinputs to make error behavior observable and deterministic.Verification Results
src/test_pause_tiers.rssrc/lib.rs; tests onlyCloses #1071