eth-to-bnc-bridge/tests
Kirill Fedoseev 34d6927c0b Added eslint configs 2019-11-01 21:42:44 +03:00
..
test Added retry promise in bncController 2019-11-01 11:21:28 +03:00
.dockerignore Added docker ignore files 2019-11-01 11:20:26 +03:00
.env Fetching last block time in bncWatcher. Prefunding eth bridge in tests 2019-10-31 18:46:14 +03:00
.eslintrc Added eslint configs 2019-11-01 21:42:44 +03:00
.mocharc.yml Wrote tests for removing validator 2019-10-29 21:07:11 +03:00
Dockerfile Bnc to eth tests, artifacts processing in circleci config 2019-10-28 15:47:07 +03:00
README.md Added tests readme 2019-11-01 11:17:33 +03:00
config.json Wrote tests for removing validator 2019-10-29 21:07:11 +03:00
init.sh Added retry promise in bncController 2019-11-01 11:21:28 +03:00
package.json First wokring tests set 2019-10-27 19:21:36 +03:00
reportersConfig.json Bnc to eth tests, artifacts processing in circleci config 2019-10-28 15:47:07 +03:00
run.sh Bnc to eth tests, artifacts processing in circleci config 2019-10-28 15:47:07 +03:00

README.md

Ethereum to Binance Chain / E2E tests

Prerequisites

To run the tests you need to have Docker and Docker Compose installed.

Correlation with CircleCI tests

CircleCI uses this tests for testing the code base.

Running

To run the bridge tests, you first need to clean old test environment, and then initialize a new one:

./demo/clean.sh
./tests/init.sh

This will create a clean development environment, using ./demo/start-environment.sh. This will also prefund user accounts from ./tests/config.json for both networks. Prefunding process uses ./src/test-services scripts. Finally, this command will start 3 validators in daemon mode (using ./demo/validator-demo.sh), and wait until they are ready.

Next, you can run the tests:

FOREIGN_PRIVATE_KEY=0000000000000000000000000000000000000000000000000000000000000000 ./tests/run.sh

FOREIGN_PRIVATE_KEY is the key, that will be used for initial prefunding first generated binance side of the bridge.

After tests are done, all active docker containers can be killed.

docker kill $(docker ps | grep validator[1-3]_ | awk '{print $1}')
docker kill ganache_side ganache_home