Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add ICQ test for new update period behaviour #NTRN-396 #350

Merged
merged 9 commits into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading