Skip to content

Commit

Permalink
test: e2e test of ica channel close flows
Browse files Browse the repository at this point in the history
- CosmosOrchAccount (IcaAccout) holder can deactivate their account (close channel)
- CosmosOrchAccount (IcaAccount) holder can reactivate their account (open new channel w same portID)
- clients cannot force a channel closure
  • Loading branch information
0xpatrickdev committed Aug 19, 2024
1 parent a779e08 commit ad1ab81
Show file tree
Hide file tree
Showing 3 changed files with 411 additions and 6 deletions.
20 changes: 14 additions & 6 deletions multichain-testing/test/basic-flows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,21 @@ test.before(async t => {
t.context = { ...rest, wallets, deleteTestKeys };

t.log('bundle and install contract', contractName);
await t.context.deployBuilder(contractBuilder);
const { vstorageClient } = t.context;
await t.context.retryUntilCondition(
() => vstorageClient.queryData(`published.agoricNames.instance`),
res => contractName in Object.fromEntries(res),
`${contractName} instance is available`,
const { vstorageClient, deployBuilder, retryUntilCondition } = t.context;
const installedContracts = await vstorageClient.queryData(
`published.agoricNames.instance`,
);
const isInstalled = contractName in Object.fromEntries(installedContracts);
if (!isInstalled) {
await deployBuilder(contractBuilder);
await retryUntilCondition(
() => vstorageClient.queryData(`published.agoricNames.instance`),
res => contractName in Object.fromEntries(res),
`${contractName} instance is available`,
);
} else {
t.log('Contract found. Skipping installation...');
}
});

test.after(async t => {
Expand Down
Loading

0 comments on commit ad1ab81

Please sign in to comment.