diff --git a/docker/Makefile b/docker/Makefile index add9205..1dd609b 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -13,6 +13,8 @@ build-ganache: @docker build . -f ./ganache/Dockerfile -t concordia-ganache run-ganache: @docker-compose -f ./ganache/docker-compose.yml -p concordia up -d +run-ganache-test: + @docker-compose -f ./ganache/docker-compose.test.yml -p concordia up -d # Rendezvous targets run-rendezvous: @@ -26,7 +28,7 @@ build-contracts-migrate: build-contracts-tests: @docker build ../ -f ./concordia-contracts/Dockerfile --target test -t concordia-contracts-tests --build-arg TZ=Europe/Athens run-contract-tests: - @docker run --rm -v `pwd`/reports/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=concordia_ganache-network concordia-contracts-tests:latest + @docker run --rm -v `pwd`/reports/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=concordia_ganache-test-network concordia-contracts-tests:latest run-contract-tests-host-chain: @docker run --rm -v `pwd`/reports/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=host concordia-contracts-tests:latest run-contracts-migrate: diff --git a/docker/concordia-contracts/test-contracts.sh b/docker/concordia-contracts/test-contracts.sh index 144a4e5..cbae85d 100644 --- a/docker/concordia-contracts/test-contracts.sh +++ b/docker/concordia-contracts/test-contracts.sh @@ -1,8 +1,11 @@ #!/bin/sh +export CHAIN_HOST="$TEST_CHAIN_HOST" +export CHAIN_PORT="$TEST_CHAIN_PORT" + yarn _eslint -f html -o /usr/test-reports/concordia-contracts-eslint.html --no-color && (yarn _solhint >/usr/test-reports/concordia-contracts-solhint.report) && - (yarn test >/usr/test-reports/concordia-contracts-truffle-tests.report) + (yarn test --network env >/usr/test-reports/concordia-contracts-truffle-tests.report) if [ $? -eq 0 ]; then echo "TESTS RAN SUCCESSFULLY!"