From e57e425a6348fc7f9578766f2685ebc20a0040a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Fri, 15 Nov 2024 10:10:29 +0100 Subject: [PATCH] Add MULLVAD_HOST setting to test-by-version.sh --- test/scripts/test-utils.sh | 7 +++++++ test/test-by-version.sh | 1 + 2 files changed, 8 insertions(+) diff --git a/test/scripts/test-utils.sh b/test/scripts/test-utils.sh index d5f12489ead4..319c64602050 100755 --- a/test/scripts/test-utils.sh +++ b/test/scripts/test-utils.sh @@ -293,6 +293,12 @@ function run_tests_for_os { runner_dir_flag=() fi + if [ -n "${MULLVAD_HOST+x}" ]; then + mullvad_host_arg=("--mullvad-host" "$MULLVAD_HOST") + else + mullvad_host_arg=() + fi + if ! RUST_LOG_STYLE=always $test_manager run-tests \ --account "${ACCOUNT_TOKEN:?Error: ACCOUNT_TOKEN not set}" \ --app-package "${APP_PACKAGE:?Error: APP_PACKAGE not set}" \ @@ -301,6 +307,7 @@ function run_tests_for_os { --package-dir "${package_dir}" \ --vm "$vm" \ --openvpn-certificate "${OPENVPN_CERTIFICATE:-"assets/openvpn.ca.crt"}" \ + "${mullvad_host_arg[@]}" \ "${test_filters_arg[@]}" \ "${runner_dir_flag[@]}" \ 2>&1 | sed -r "s/${ACCOUNT_TOKEN}/\{ACCOUNT_TOKEN\}/g"; then diff --git a/test/test-by-version.sh b/test/test-by-version.sh index 337a0dfe8368..e9de281badf7 100755 --- a/test/test-by-version.sh +++ b/test/test-by-version.sh @@ -12,6 +12,7 @@ usage() { echo " - APP_VERSION: The version of the app to test (defaults to the latest stable release)" echo " - APP_PACKAGE_TO_UPGRADE_FROM: The package version to upgrade from (defaults to none)" echo " - OPENVPN_CERTIFICATE: Path to an OpenVPN CA certificate the app should use during test (defaults to assets/openvpn.ca.crt)" + echo " - MULLVAD_HOST: Conncheck and API environment to use, eg stagemole.eu (defaults to mullvad.net, or the config file if set)" echo " - TEST_DIST_DIR: Relative path to a directory with prebuilt binaries as produced by scripts/build.sh." echo " - TEST_FILTERS: specifies which tests to run (defaults to all)" echo " - TEST_REPORT : path to save the test results in a structured format"