Browse Source

fix: fix docker contracts test script

develop
Apostolos Fanakis 4 years ago
parent
commit
f3c009a6f3
Signed by: Apostolof GPG Key ID: 8600B4C4163B3269
  1. 14
      docker/concordia-contracts/test-contracts.sh
  2. 2
      docker/env/ganache.test.env

14
docker/concordia-contracts/test-contracts.sh

@ -3,11 +3,17 @@
export CHAIN_HOST="$TEST_CHAIN_HOST" export CHAIN_HOST="$TEST_CHAIN_HOST"
export CHAIN_PORT="$TEST_CHAIN_PORT" export CHAIN_PORT="$TEST_CHAIN_PORT"
yarn _eslint -f html -o /mnt/concordia/test-reports/concordia-contracts-eslint.html --no-color && yarn _eslint -f html -o /mnt/concordia/test-reports/concordia-contracts-eslint.html --no-color
(yarn _solhint >/mnt/concordia/test-reports/concordia-contracts-solhint.report) && ESLINT_EXIT_STATUS=$?
(yarn test --network env >/mnt/concordia/test-reports/concordia-contracts-truffle-tests.report)
if [ $? -eq 0 ]; then yarn _solhint >/mnt/concordia/test-reports/concordia-contracts-solhint.report
SOLHINT_EXIT_STATUS=$?
yarn test --network env >/mnt/concordia/test-reports/concordia-contracts-truffle-tests.report
grep -qE failing /mnt/concordia/test-reports/concordia-contracts-truffle-tests.report
TRUFFLE_TEST_FAILING=$?
if [ $ESLINT_EXIT_STATUS -eq 0 ] && [ "$SOLHINT_EXIT_STATUS" -eq 0 ] && [ "$TRUFFLE_TEST_FAILING" -eq 1 ]; then
echo "TESTS RAN SUCCESSFULLY!" echo "TESTS RAN SUCCESSFULLY!"
exit 0 exit 0
else else

2
docker/env/ganache.test.env

@ -1,5 +1,5 @@
ACCOUNTS_NUMBER=5 ACCOUNTS_NUMBER=5
ACCOUNTS_ETHER=1 ACCOUNTS_ETHER=100
MNEMONIC="myth like bonus scare over problem client lizard pioneer submit female collect" MNEMONIC="myth like bonus scare over problem client lizard pioneer submit female collect"
HOST=0.0.0.0 HOST=0.0.0.0
PORT=8546 PORT=8546

Loading…
Cancel
Save