diff --git a/e2e/tests-dfx/call.bash b/e2e/tests-dfx/call.bash index 1f7ee09e05..82a1c0a896 100644 --- a/e2e/tests-dfx/call.bash +++ b/e2e/tests-dfx/call.bash @@ -123,7 +123,7 @@ teardown() { ID="$(dfx canister id hello_backend)" NETWORK="http://localhost:$(cat .dfx/webserver-port)" ( - cd "$DFX_E2E_TEMP_DIR" + cd "$E2E_TEMP_DIR" mkdir "not-a-project-dir" cd "not-a-project-dir" assert_command dfx canister --network "$NETWORK" call "$ID" greet '("you")' diff --git a/e2e/tests-dfx/ping.bash b/e2e/tests-dfx/ping.bash index 8e0cfd0f70..ec0cca73cc 100644 --- a/e2e/tests-dfx/ping.bash +++ b/e2e/tests-dfx/ping.bash @@ -38,9 +38,9 @@ teardown() { dfx_start webserver_port=$(get_webserver_port) - mkdir "$DFX_E2E_TEMP_DIR/not-a-project" + mkdir "$E2E_TEMP_DIR/not-a-project" ( - cd "$DFX_E2E_TEMP_DIR/not-a-project" + cd "$E2E_TEMP_DIR/not-a-project" assert_command dfx ping http://127.0.0.1:"$webserver_port" assert_match "\"ic_api_version\"" diff --git a/e2e/tests-dfx/sign_send.bash b/e2e/tests-dfx/sign_send.bash index aed6d36122..07822375fd 100644 --- a/e2e/tests-dfx/sign_send.bash +++ b/e2e/tests-dfx/sign_send.bash @@ -41,7 +41,7 @@ teardown() { } @test "sign outside of a dfx project" { - cd "$DFX_E2E_TEMP_DIR" + cd "$E2E_TEMP_DIR" mkdir not-a-project-dir cd not-a-project-dir diff --git a/e2e/utils/_.bash b/e2e/utils/_.bash index 7d5e1f8af5..b91a17661e 100644 --- a/e2e/utils/_.bash +++ b/e2e/utils/_.bash @@ -12,7 +12,7 @@ install_asset() { standard_setup() { # We want to work from a temporary directory, different for every test. x=$(mktemp -d -t dfx-e2e-XXXXXXXX) - export DFX_E2E_TEMP_DIR="$x" + export E2E_TEMP_DIR="$x" mkdir "$x/working-dir" mkdir "$x/cache-root" @@ -28,7 +28,7 @@ standard_setup() { } standard_teardown() { - rm -rf "$DFX_E2E_TEMP_DIR" || rm -rf "$DFX_E2E_TEMP_DIR" + rm -rf "$E2E_TEMP_DIR" || rm -rf "$E2E_TEMP_DIR" } dfx_new_frontend() { @@ -91,12 +91,10 @@ dfx_patchelf() { dfx_start() { dfx_patchelf - if [ "$GITHUB_WORKSPACE" ]; then - # no need for random ports on github workflow; even using a random port we sometimes - # get 'address in use', so the hope is to avoid that by using a fixed port. + if [ "$E2E_STATIC_PORTS" ]; then FRONTEND_HOST="127.0.0.1:8000" else - # Start on random port for parallel test execution (needed on nix/hydra) + # Start on random port for parallel test execution or to coexist with a local server FRONTEND_HOST="127.0.0.1:0" fi