Skip to content

Add pause then cancel then restore round-trip lifecycle test #589

Description

@greatest0fallt1me

Description

Exercise a full round-trip through Paused, Cancelled, and Restored states to confirm state-machine transitions, metadata preservation, and secondary-index consistency after each hop.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: contracts/subscription_vault/src/subscription.rs
  • Test lives in contracts/subscription_vault/src/test_lifecycle_roundtrip.rs

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b tests/lifecycle-roundtrip
  • Implement changes
    • Drive create -> pause -> cancel -> restore
    • Assert secondary index membership after each step
    • Assert emitted events in order
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • cargo test --all
  • Cover edge cases
    • Restore after long dormancy, restore with expired metadata TTL, and repeat round-trip
  • Include test output and security notes

Example commit message

test: lifecycle round-trip pause/cancel/restore

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Labels

Stellar WaveStellar Wave issue batch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions