diff --git a/.env b/.env index 797c39f..59d5fdd 100644 Binary files a/.env and b/.env differ diff --git a/integration_test/launch_test.sh b/integration_test/launch_test.sh index 27be648..f33b6a0 100755 --- a/integration_test/launch_test.sh +++ b/integration_test/launch_test.sh @@ -5,8 +5,9 @@ option=$2 [[ ! $testName ]] && testName='gecko_complete' # Get local IP and set .env -ip_address=$(hostname -I | awk '{print $1}') -echo "ip_address=$ip_address" > .env +#ip_address=$(hostname -I 2>/dev/null || ipconfig 2>&1 | grep "IPv4 Address" | head -n1 | awk -F ':' '{ print $2}' | tr -d ' ') # old fashion style... +#ip_address="10.0.2.2" +#echo "ip_address=$ip_address" > .env [[ $option == 'human' ]] && echo "isHumanReading=true" >> .env ## Start local Duniter node @@ -20,10 +21,10 @@ cd ../.. 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 +echo "ip_address=127.0.0.1" > .env # not used anymore, host IP is 10.0.2.2 # Stop Duniter cd integration_test/duniter docker compose down - +exit 0 diff --git a/integration_test/utility/general_actions.dart b/integration_test/utility/general_actions.dart index 0dbb612..bb699a8 100644 --- a/integration_test/utility/general_actions.dart +++ b/integration_test/utility/general_actions.dart @@ -1,6 +1,5 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:gecko/globals.dart'; import 'package:gecko/models/widgets_keys.dart'; @@ -11,7 +10,7 @@ import 'tests_utility.dart'; // GENERAL ACTIONS Future changeNode() async { - final ipAddress = dotenv.env['ip_address'] ?? '127.0.0.1'; + const ipAddress = '10.0.2.2'; log.d('ip address: $ipAddress'); await tapKey(keyDrawerMenu); diff --git a/integration_test/utility/tests_utility.dart b/integration_test/utility/tests_utility.dart index e4b3af1..b089f92 100644 --- a/integration_test/utility/tests_utility.dart +++ b/integration_test/utility/tests_utility.dart @@ -223,7 +223,7 @@ Future bkConfirmIdentity( // Change node in background Future bkSetNode([String? endpoint]) async { if (endpoint == null) { - final ipAddress = dotenv.env['ip_address'] ?? '127.0.0.1'; + const ipAddress = '10.0.2.2'; endpoint = 'ws://$ipAddress:9944'; } configBox.put('customEndpoint', endpoint);