072537f61a
fixes #9835 |
||
---|---|---|
.. | ||
.env | ||
docker-compose.yml | ||
readme.md |
readme.md
Developer helpers to run ganache dependent test cases locally
Ganache is used in tests to avoid depending on RPC internet calls
In CI ganache is started as a docker container directly from the test suite (see stage Containers
). In order to run locally you need to start ganache manually with the same options as Jenkins environment.
How to run e2e tests locally
Optionally edit .env
file to match your personal setup if the defaults don't work for you. The file is loaded by desktop-compose
from the run step.
Running
- Compile to include the squish specific configuration like this
GANACHE_NETWORK_RPC_URL="http://localhost:9545" make -j10
- This is required because
GANACHE_NETWORK_RPC_URL
is aconst
Nim variable and cannot be changed at runtime (make clean
if binary is already built without theGANACHE_NETWORK_RPC_URL
) - Upon this step the production
NETWORKS
configuration instatus-desktop/src/app_service/common/network_constants.nim
is overridden with the second pair that includes theGANACHE_NETWORK_RPC_URL
variable for all nodes along with specific token contract override forSNT
andSTT
- This is required because
- Start ganache docker environment
docker-compose up uitestganache
- Run squish desired tests (if all is setup correctly, you should see RPC output calls in the
docker-compose up
output)
Beware that the default .env
will alter the in sources test data. Using the in-sources test data folder makes it is easy to add changes to the git index.
- Solution: a copy of the
<status-desktop>/test/ui-test/fixtures/ganache-dbs/goerli
can be made outside sources and docker-compose redirected to use a personal.env
file (using the--env-file
option) pointing to the personal clone of the test data folder.