Skip to content

Commit

Permalink
Merge pull request #350 from neutron-org/fix/change-update-period-beh…
Browse files Browse the repository at this point in the history
…aviour

fix: add ICQ test for new update period behaviour #NTRN-396
  • Loading branch information
pr0n00gler authored Sep 19, 2024
2 parents 5580522 + 859b98b commit 979f9cc
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion src/testcases/run_in_band/interchain_kv_query.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,17 @@ describe('Neutron / Interchain KV Query', () => {
testState.wallets.cosmos.val1.address,
);
});

test('register icq #7: balance', async () => {
await registerBalancesQuery(
neutronClient,
contractAddress,
connectionId,
1_000_000,
[COSMOS_DENOM],
testState.wallets.cosmos.val1.address,
);
});
});
});

Expand Down Expand Up @@ -462,8 +473,24 @@ describe('Neutron / Interchain KV Query', () => {
);
});

test("registered icq #7 doesn't exist", async () => {
test('get registered icq #7: balance', async () => {
const queryId = 7;
const queryResult = await getRegisteredQuery(
neutronClient,
contractAddress,
queryId,
);

expect(
queryResult.registered_query.last_submitted_result_local_height,
).greaterThan(0);
expect(
queryResult.registered_query.last_submitted_result_local_height,
).lessThan(queryResult.registered_query.update_period);
});

test("registered icq #8 doesn't exist", async () => {
const queryId = 8;
await expect(
getRegisteredQuery(neutronClient, contractAddress, queryId),
).rejects.toThrow();
Expand Down

0 comments on commit 979f9cc

Please sign in to comment.