Skip to content

test: two vault instances are isolated#102

Merged
greatest0fallt1me merged 1 commit intoCalloraOrg:mainfrom
Drock0:test/two-vaults-isolation
Feb 27, 2026
Merged

test: two vault instances are isolated#102
greatest0fallt1me merged 1 commit intoCalloraOrg:mainfrom
Drock0:test/two-vaults-isolation

Conversation

@Drock0
Copy link
Contributor

@Drock0 Drock0 commented Feb 26, 2026

Add Unit Test: Two Different Vault Instances Isolated

Description

This PR addresses issue #29 by adding a comprehensive test to verify that the deployment of multiple CalloraVault instances guarantees complete state isolation.

The test deploys two distinct vault instances with their own contract IDs, assigns them unique owners, and initializes them with differing starting balances. It then forcefully simulates activity (deposits and deductions) on the first instance and asserts that the second instance's balance and state metadata remain entirely independent and unchanged.

Changes Made

  • Unit Testing: Added two_vault_instances_are_isolated in contracts/vault/src/test.rs.
  • Verifies that deposit and deduct transactions processed by vault A do not bleed into or leak state variables affecting the integrity of vault B.

Testing Output

All tests in the workspace—including the new isolation verification test—were executed and pass without failure.

Related Issues

Closes #29

@greatest0fallt1me greatest0fallt1me self-requested a review February 27, 2026 01:05
@greatest0fallt1me greatest0fallt1me merged commit b958ca5 into CalloraOrg:main Feb 27, 2026
0 of 3 checks passed
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 Unit Test: Two Different Vault Instances Isolated

2 participants