End-to-End Tests
The Step-By-Step Guideâ
Expanding End-to-End Tests Suiteâ
The end-to-end (E2E) tests suite is a tool that the zkVerify CI/CD pipeline leverages to externally test the node features. Expanding it to accomodate your new pallet is important for stability and reliability reasons.
Proceed by following the steps below:
-
Create a new file
zombienet-tests/js_scripts/foo_data.jsand inside it, define the test data in a similar way to what you did forverifiers/foo/src/resources.rs:const PROOF = "0x00...02"const PUBS = "0000000000000000000000000000000000000000000000000000000000000003"const VKEY = "0x0000000000000000000000000000000000000000000000000000000000000001"exports.PROOF = PROOFexports.PUBS = PUBSexports.VK = VKEY -
Adapt the file
zombienet-tests/js_scripts/0005-proofPath_rpc.jsadding this line after the analogous ones for the other verifiers:const { PROOF: FOO_PROOF, PUBS: FOO_PUBS, VK: FOO_VK } = require('./foo_data.js');And finally adapt the file
zombienet-tests/js_scripts/0005-proofPath_rpc.jsby adding the code below:,{name: "Foo",pallet: api.tx.settlementFooPallet,args: [{ 'Vk': FOO_VK }, FOO_PROOF, FOO_PUBS],}
At this point you should be able to run end-to-end tests locally following the instructions provided in the file zombienet-tests/README.md.