Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/tests-dfx/call.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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")'
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests-dfx/ping.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests-dfx/sign_send.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 4 additions & 6 deletions e2e/utils/_.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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() {
Expand Down Expand Up @@ -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

Expand Down