Contains all the integration & end-user tests ran on a live network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
woop-test/localnet
harjas 3f305d90f0 update reference response 2 years ago
..
configs update staking tests 3 years ago
rpc_tests update reference response 2 years ago
scripts modify the go tests script path 3 years ago
.gitignore Updates: 4 years ago
Dockerfile update dockerfile 3 years ago
Makefile Updated test-docker command 4 years ago
README.md Updated test-docker command 4 years ago
requirements.txt [localnet] Make test run with a fixed 8 workers 4 years ago

README.md

Localnet tests

Tools wrapped in a Dockerfile to build, deploy and test a localnet.

Assumptions

  • The main harmony repo follows the GO-PATH convention. So the path to said repo must be:
$(go env GOPATH)/src/github.com/harmony-one/harmony
  • This repo follows the GO-PATH convention. So the path to said repo must be:
$(go env GOPATH)/src/github.com/harmony-one/harmony-test
  • No extra transactions on the localnet are done prior to running the pytest in ./tests or execution of the rosetta integration test.
  • The localnet faucet address is one1zksj3evekayy90xt4psrz8h6j2v3hla4qwz4ur

Requirements (dev testing - no docker)

  • Go
  • jq
  • Python 3.6+
  • Pip3
  • Python lib requirements from requirements.txt

You can install the libs with the following command: make install

Create a python venv

This step is optional but recommended to not pollute your local Python installation.

 python3 -m venv .venv
 source .venv/bin/activate

Build & run tests

  • To build the docker image locally, do:
make build
  • If you wish to build the docker image with a custom tag, do:
docker build -t "$TAG_NAME" .

Note that you have to be in the same directory as the Dockerfile

  • To release the docker image to Dockerhub, do:
make upload
  • To run the test (start localnet, test, and teardown) outside of the docker image (for dev testing), do:
make test

This will test whatever is in the main repo (following GO-PATH convention).

  • To run the localnet tests with docker using your local harmony repository, do:
make test-docker

This will test whatever is in the main repo (following GO-PATH convention).

Release

To release the docker image (used by PR test & main repo), first make sure it passes the release test:

make upload-test

This will run the tests, wrapped in a docker img, 10 times and expects all 10 times to be successful.

Then upload with (assuming you have proper docker-hub credentials):

make upload