The main file is test_integration/main.sh as called from
package.json.
Docker compose spawns two instances of geth, one for origin and one for
auxiliary. It also tears them down after the tests.
In between the tests are run. integration_tests.js puts everything
together (truffle and mocha) and executes the tests in the integration
test directory.
Deployment is required to deploy the contracts and add them to the
shared module.
The shared module is an object that stores data across tests. For
example Web3 instances or TruffleContract instances.
Stake and mint is just an example.
As examples I added two Anchors and the two Gateways to this PR. Can be
extended as required.
I had to use truffle exec in order to have access to
artifacts.require.
The main file is
test_integration/main.sh
as called frompackage.json
.Docker compose spawns two instances of geth, one for origin and one for auxiliary. It also tears them down after the tests.
In between the tests are run.
integration_tests.js
puts everything together (truffle and mocha) and executes the tests in the integration test directory.Deployment is required to deploy the contracts and add them to the
shared
module.The
shared
module is an object that stores data across tests. For example Web3 instances or TruffleContract instances.Stake and mint is just an example.
As examples I added two Anchors and the two Gateways to this PR. Can be extended as required.
I had to use
truffle exec
in order to have access toartifacts.require
.Fixes #608