-
Notifications
You must be signed in to change notification settings - Fork 322
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
test: add regression tests for issues MOON-2822 MOON-2824 #2781
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be better to instead design the smoke test to generically collect all of our "bad block regressions" as this has happened in the past with alpha net too. This smoke test should have a const record of chain, block, query/call and then verify against an expected result
|
||
it({ | ||
id: "C001", | ||
title: "Verify MOON-2824", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
give a more descriptive title so we dont have to copy and paste that into jira each time
}, | ||
); | ||
|
||
expect(result).to.contain("0x"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want the response result to be 0x
use toBe("0x")
as contain will do partial matches
functionName: "balanceOf", | ||
args: ["0x30763be2bf075c3fDeA704c5f59A76d011d02943", 2], | ||
}); | ||
const result = await (context.ethers().provider as ethers.JsonRpcProvider).call( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use the viem .call()
function so you don't mix and match provider libraries (since you're using viem's encodeFunctionData
fn already):
id: "C001", | ||
title: "Verify MOON-2824", | ||
test: async function () { | ||
if (paraApi.consts.system.version.specName.toString() !== "moonriver") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this for all moonbeam
runtimes or for only the Moonbeam network?
If the former then you can use: chainType: "moonbeam",
on the test case. If the latter then it's api.rpc.system.chain()
Coverage Report@@ Coverage Diff @@
## master rq/smoking-tests +/- ##
===================================================
Coverage 73.06% 73.06% 0.00%
Files 228 228
Lines 69944 69944
===================================================
Hits 51103 51103
Misses 18841 18841
|
Also add a regression test for |
What does it do?
Adds regression tests for recent eth_call errors