From 5f17a3b0463a325b5a5cfb32992011d2fe6f8f86 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Tue, 13 Feb 2024 13:49:09 +1100 Subject: [PATCH] t2 --- .drevops/tests/bats/_helper.bash | 10 +++++----- .drevops/tests/bats/update-drevops.bats | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.drevops/tests/bats/_helper.bash b/.drevops/tests/bats/_helper.bash index aa401ab95..3d0a320f8 100644 --- a/.drevops/tests/bats/_helper.bash +++ b/.drevops/tests/bats/_helper.bash @@ -103,11 +103,16 @@ setup() { # Directory where the application may store it's temporary files. export APP_TMP_DIR="${BUILD_DIR}/tmp" + # Use unique installer checkout dir to allow multiple calls of this function + # with a single test. + INSTALLER_CHECKOUT_DIR="${APP_TMP_DIR}/installer_$(random_string)" + fixture_prepare_dir "${BUILD_DIR}" fixture_prepare_dir "${CURRENT_PROJECT_DIR}" fixture_prepare_dir "${DST_PROJECT_DIR}" fixture_prepare_dir "${LOCAL_REPO_DIR}" fixture_prepare_dir "${APP_TMP_DIR}" + fixture_prepare_dir "${INSTALLER_CHECKOUT_DIR}" ## ## Phase 4: Application variables setup. @@ -960,11 +965,6 @@ run_install_quiet() { fixture_prepare_dir "${DREVOPS_INSTALL_TMP_DIR}" export DREVOPS_INSTALL_TMP_DIR - # Use unique installer checkout dir to allow multiple calls of this function - # with a single test. - INSTALLER_CHECKOUT_DIR="${APP_TMP_DIR}/installer_$(random_string)" - fixture_prepare_dir "${INSTALLER_CHECKOUT_DIR}" - # Tests are using demo database and 'ahoy download-db' command, so we need # to set the CURL DB to test DB. # diff --git a/.drevops/tests/bats/update-drevops.bats b/.drevops/tests/bats/update-drevops.bats index 8cf206776..b64913356 100644 --- a/.drevops/tests/bats/update-drevops.bats +++ b/.drevops/tests/bats/update-drevops.bats @@ -48,7 +48,7 @@ load _helper.bash # Enforce debugging of the install script. export DREVOPS_INSTALL_DEBUG=1 # Override install script with currently tested one to be called from ./scripts/drevops/update-drevops.sh - export DREVOPS_INSTALLER_URL="file://${ROOT_DIR}/.drevops/installer/.build/install.phar" + export DREVOPS_INSTALLER_URL="file://${INSTALLER_CHECKOUT_DIR}/install.php" # shellcheck disable=SC2059 run ahoy update-drevops assert_success