[localnet] Add make cmd to only run tests

pull/1/head
Daniel Van Der Maden 4 years ago
parent f052a9964c
commit 2c9b966bc7
  1. 8
      localnet/Makefile
  2. 9
      localnet/README.md

@ -5,7 +5,8 @@ help:
@echo "build - build the docker image"
@echo "build-cached - build the docker image with cache"
@echo "upload - upload the docker image to dockerhub (require credentials)"
@echo "test - run the localnet tests without docker"
@echo "test - run the test suite"
@echo "run - run the localnet tests without docker"
install:
python3 -m pip install -r requirements.txt
@ -19,6 +20,9 @@ build-cached:
upload:
docker push harmonyone/node-test
test:
run:
bash ./scripts/run.sh
test:
python3 -u -m py.test -v -r s -s tests -n auto

@ -30,12 +30,17 @@ docker build -t "$TAG_NAME" .
make upload
```
* To run the localnet tests outside of the docker image (for dev testing), do:
* To run the test (start localnet, test, and teardown) outside of the docker image (for dev testing), do:
```bash
make test
make run
```
> This will test whatever is in the main repo (following GO-PATH convention).
* If you already have a localnet running and want to run just the test suite, do:
```bash
make test
```
* To run the localnet tests, do:
```bash
docker run -v "$(go env GOPATH)/src/github.com/harmony-one/harmony:/go/src/github.com/harmony-one/harmony" harmonyone/node-test

Loading…
Cancel
Save