diff --git a/acceptance/cmd/workspace/apps/run-local-node/script b/acceptance/cmd/workspace/apps/run-local-node/script index 9749e979748..2bd2238c54b 100755 --- a/acceptance/cmd/workspace/apps/run-local-node/script +++ b/acceptance/cmd/workspace/apps/run-local-node/script @@ -2,8 +2,6 @@ cd app # Ports are allocated per run so that tests in parallel worktrees do not collide. read -r APP_PORT PROXY_PORT DEBUG_PORT PREPARE_PORT <<< "$(free_port.py 4)" -add_repl "$PROXY_PORT" PROXY_PORT -add_repl "$DEBUG_PORT" DEBUG_PORT # The app and the proxy start asynchronously; allow up to 15s for them to come up. export RETRY_MAX_ATTEMPTS=30 diff --git a/acceptance/cmd/workspace/apps/run-local-node/test.toml b/acceptance/cmd/workspace/apps/run-local-node/test.toml index f46c1e68b26..de4fc763760 100644 --- a/acceptance/cmd/workspace/apps/run-local-node/test.toml +++ b/acceptance/cmd/workspace/apps/run-local-node/test.toml @@ -9,3 +9,17 @@ Ignore = [ ] # The command is unrelated to bundle deployment, so run it once rather than per engine. + +# Ports are allocated per run. Mask them by context: a bare-number replacement would also hit +# a matching run of digits inside the debugger's UUID and break its [UUID] masking. +[[Repls]] +Old = 'http://127\.0\.0\.1:\d+' +New = 'http://127.0.0.1:[PROXY_PORT]' + +[[Repls]] +Old = 'ws://127\.0\.0\.1:\d+' +New = 'ws://127.0.0.1:[DEBUG_PORT]' + +[[Repls]] +Old = 'attach a debugger to port \d+' +New = 'attach a debugger to port [DEBUG_PORT]' diff --git a/acceptance/cmd/workspace/apps/run-local/script b/acceptance/cmd/workspace/apps/run-local/script index fd8b8b3c23e..f16f7db1d78 100755 --- a/acceptance/cmd/workspace/apps/run-local/script +++ b/acceptance/cmd/workspace/apps/run-local/script @@ -2,8 +2,6 @@ cd app # Ports are allocated per run so that tests in parallel worktrees do not collide. read -r APP_PORT PROXY_PORT ENTRY_POINT_PORT <<< "$(free_port.py 3)" -add_repl "$APP_PORT" APP_PORT -add_repl "$PROXY_PORT" PROXY_PORT # The app and the proxy start asynchronously; allow up to 15s for them to come up. export RETRY_MAX_ATTEMPTS=30 diff --git a/acceptance/cmd/workspace/apps/run-local/test.toml b/acceptance/cmd/workspace/apps/run-local/test.toml index 43720d22644..cc57c18eb4b 100644 --- a/acceptance/cmd/workspace/apps/run-local/test.toml +++ b/acceptance/cmd/workspace/apps/run-local/test.toml @@ -3,7 +3,15 @@ RecordRequests = false # The command is unrelated to bundle deployment, so run it once rather than per engine. -# The ports are registered as replacements by the script, which is where they are allocated. +# Ports are allocated per run. Mask them by context: a bare-number replacement would also hit +# a matching run of digits inside the X-Request-Id UUID and break its [UUID] masking. +[[Repls]] +Old = 'http://(127\.0\.0\.1|localhost):\d+' +New = 'http://$1:[PROXY_PORT]' + +[[Repls]] +Old = '"Host": "127\.0\.0\.1:\d+"' +New = '"Host": "127.0.0.1:[APP_PORT]"' [[Repls]] Old='curl/[0-9]+\.[0-9]+\.[0-9]+'