You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently write precompile unit tests in HardHat where we specify a genesis file that activates the precompile to launch a network and then run a HardHat test suite on top of the network.
This currently requires adding a precompile test explicitly that specifies the HardHat file and the genesis file to use in ginkgo.
We should change this test in ginkgo to scan the repo for all of the HardHat files and corresponding genesis.json files, so that it can automagically orchestrate and run each test. To do this, it should scan the directory of HardHat test files, find a genesis file with the corresponding name, and then spin up a Subnet with that genesis file, and execute the HardHat tests on top of that Subnet.
To make sure that we do not accidentally create HardHat tests that are not caught and do not run in CI, the precompile test should make sure that there are the same number of HardHat test files as there are genesis files and that each test file has a corresponding genesis file.
This will reduce the number of places that precompile developers need to touch code within Subnet-EVM in order to write their e2e tests.
Align the names of all genesis files with the names of the corresponding Hardhat tests in contract-examples/
Move all genesis JSON files into the contract-examples/ directory
Update the precompile ginkgo tests to scan the HardHat and genesis JSON files as described and spin up the Subnets to run them
Add a check to ensure that there is a HardHat test for each precompile (number of precompile addresses or registered modules)
Update the PrecompileGen tutorial to reflect the new process for writing e2e tests for a precompile
The text was updated successfully, but these errors were encountered:
We have slightly changed e2e tests to be run in a custom environments and commands. We should not force e2e tests to use only hardhat, but they should be able to run various test commands as well. See #672
We currently write precompile unit tests in HardHat where we specify a genesis file that activates the precompile to launch a network and then run a HardHat test suite on top of the network.
This currently requires adding a precompile test explicitly that specifies the HardHat file and the genesis file to use in ginkgo.
We should change this test in ginkgo to scan the repo for all of the HardHat files and corresponding genesis.json files, so that it can automagically orchestrate and run each test. To do this, it should scan the directory of HardHat test files, find a genesis file with the corresponding name, and then spin up a Subnet with that genesis file, and execute the HardHat tests on top of that Subnet.
To make sure that we do not accidentally create HardHat tests that are not caught and do not run in CI, the precompile test should make sure that there are the same number of HardHat test files as there are genesis files and that each test file has a corresponding genesis file.
This will reduce the number of places that precompile developers need to touch code within Subnet-EVM in order to write their e2e tests.
contract-examples/
contract-examples/
directoryThe text was updated successfully, but these errors were encountered: