Skip to content

Commit

Permalink
Fix moonsama smoke tests (#3016)
Browse files Browse the repository at this point in the history
  • Loading branch information
RomarQ authored Oct 17, 2024
1 parent 30fbc0a commit 2e47202
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions test/suites/smoke/test-old-regressions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ class BadBlockRegressionCase {
callData: `0x${string}`;
}

interface TransactionRegressionCase {
network: Network;
runtime: number;
blockNumber: number;
txHash: `0x${string}`;
}

// Issues/Regressions
// MOON-2824
const moon2824: BadBlockRegressionCase = {
Expand Down Expand Up @@ -177,10 +184,16 @@ describeSuite({
it({
id: "C003",
title: "Verify tracing works for transactions generated by all runtime versions",
test: async function () {
test: async function (context) {
const network = paraApi.consts.system.version.specName.toString() as Network;
const testSamples = network in samples ? samples[network] : [];
testSamples.forEach(async (sample) => {
const testSamples: TransactionRegressionCase[] = network in samples ? samples[network] : [];
for (const sample of testSamples) {
const chain = (await paraApi.rpc.system.chain()).toString().toLowerCase();
if (sample.network !== chain) {
log(`Skipping test...`);
context.skip();
}

log(`Testing sample: ${JSON.stringify(sample.txHash)}`);
const traceData = await context.viem().request<TraceTransactionSchema>({
method: "debug_traceTransaction",
Expand All @@ -195,13 +208,13 @@ describeSuite({
log(`Error found for sample: ${JSON.stringify(sample)}`);
throw e;
}
});
}
},
});

it({
id: "C004",
title: "Moonriver: eth_getLogs with more than 16 addresses filtered should return logs",
title: "Moonriver: eth_getLogs with more than 1024 addresses filtered should return logs",
chainType: "moonriver",
test: async function () {
const addresses = Array.from({ length: 1024 }, () => generateKeyringPair()).map(
Expand Down

0 comments on commit 2e47202

Please sign in to comment.