tokenbridge/oracle-e2e
Przemyslaw Rzad c9d100491c
Ultimate E2E tests (#158)
* Ultimate e2e for native to erc type of bridge

* One job

* Try to run the tests

* Run on CI

* Docs

* Cosmetics

* Final changes

* Revert the changes

* Networks

* Waiting for Oracle

* One job

* Initialize the contracts submodule

* Run on ci

* comment

* Sleep.

* ultimate network

* Docker localhost no longer needed

* Final changes

* Timeout

* Naming

* Sleep task.
2019-07-26 10:14:25 +02:00
..
test Oracle-e2e using Commons (#146) 2019-07-12 10:53:16 +02:00
.eslintrc E2E files linting (#117) 2019-07-02 15:12:57 +02:00
package.json Ultimate E2E tests (#158) 2019-07-26 10:14:25 +02:00
README.md Cosistent TokenBridge naming (#159) 2019-07-19 09:18:51 +02:00
run-tests.sh Common deploy 2019-06-04 09:11:56 +02:00

POA TokenBridge / Oracle-E2E

End to end tests for the POA TokenBridge Oracle.

Prerequisites

To run the tests you need to have Docker and Docker Compose installed. If you are on Linux, it's also recommended that you create a docker group and add your user to it, so that you can use the CLI without sudo.

Running

To run the bridge end-to-end tests, you just have to run:

./run-tests.sh

If this is the first time that you do this, it will take some time to build the docker images, but the next time they will be cached.

How it works

The script starts several containers and then use them to run the tests. These services are:

  • Two parity nodes with the InstanSeal engine, representing the home and foreign chains.
  • A Redis container.
  • A RabbitMQ container.
  • The bridge (without doing anything at first)
  • The container for the end-to-end tests (also without doing anything)

Afterwards, contracts will be deployed to the respective chains, all the bridge scripts will be executed (using the bridge service) and tests (using the e2e service) will be executed. The last process exit code will be used as the result of the testing suite.

Debugging

Sometimes you may need to look into what happened in each service after running the tests. For doing this, comment out the docker-compose down line in the run-tests.sh file, and all the containers will be kept running after the script finishes. Some things you can do:

  • Connect to the home chain using http://localhost:8541 as the URL.
  • Connect to the foreign chain using http://localhost:8542 as the URL.
  • Open the RabbitMQ Management service (go to http://localhost:15672 in the browser and log in with username/password guest/guest).
  • Inspect the logs using docker logs CONTAINER. You can obtain the container name with the docker ps command.