gecko/integration_test/launch_test.sh

30 lines
648 B
Bash
Raw Normal View History

#!/bin/bash
2022-08-24 21:53:16 +02:00
testName=$1
option=$2
2022-08-24 21:53:16 +02:00
[[ ! $testName ]] && testName='gecko_complete'
# Get local IP and set .env
ip_address=$(hostname -I | awk '{print $1}')
echo "ip_address=$ip_address" > .env
[[ $option == 'human' ]] && echo "isHumanReading=true" >> .env
## Start local Duniter node
cd integration_test/duniter
2022-09-01 16:43:55 +02:00
docker compose down
rm -rf data/chains
2022-09-01 16:43:55 +02:00
docker compose up -d
cd ../..
# Start integration test
2022-09-09 01:12:17 +02:00
flutter test integration_test/scenarios/$testName.dart && echo '0' > /tmp/geckoTestResult || echo '1' > /tmp/geckoTestResult
# Reset .env
echo "ip_address=127.0.0.1" > .env
# Stop Duniter
cd integration_test/duniter
2022-09-01 16:43:55 +02:00
docker compose down