Skip to content

test: add integration test asserting require_not_paused blocks mutating calls (#227) - #326

Merged
Idaonoli merged 2 commits into
stellar-compliance-kit:mainfrom
the-Devdrago:feat/issue-227-require-not-paused-integration-test
Sep 3, 2026
Merged

test: add integration test asserting require_not_paused blocks mutating calls (#227)#326
Idaonoli merged 2 commits into
stellar-compliance-kit:mainfrom
the-Devdrago:feat/issue-227-require-not-paused-integration-test

Conversation

@the-Devdrago

Copy link
Copy Markdown
Contributor

Description

This PR adds an integration test suite for the compliance-pausable crate asserting that require_not_paused actually blocks every state-mutating entrypoint in consumer contracts while paused, allows read-only calls while paused, and permits mutations once unpaused.

Changes Implemented

  • Added contracts/pausable/tests/require_not_paused_integration.rs containing:
    • A table-driven test suite exercising every state-mutating entrypoint (set_flag, record_data, batch_update, transfer_value, update_setting) on a representative consumer contract while paused and asserting each one returns Err(ContractPaused).
    • Verification that all read-only methods (get_flag, get_record, get_balance, get_setting, is_paused) remain unblocked while paused.
    • Verification that mutating entrypoints resume successfully after unpause().
    • A negative-testing verification on a flawed consumer contract confirming that any mutating entrypoint that forgets require_not_paused causes an immediate, obvious test failure.
    • Instance storage isolation test verifying pause state does not leak between contract instances.
  • Added contracts/pausable to workspace members in Cargo.toml.

Closes #227

@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

@the-Devdrago is attempting to deploy a commit to the idaonoli-2655's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@the-Devdrago Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Idaonoli
Idaonoli merged commit 3bfb8d7 into stellar-compliance-kit:main Sep 3, 2026
1 check failed
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.

Add an integration test that require_not_paused actually blocks every pausable contract's state-mutating calls

2 participants