Skip to content
Merged
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: 0 additions & 2 deletions acceptance/cmd/workspace/apps/run-local-node/script
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions acceptance/cmd/workspace/apps/run-local-node/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]'
2 changes: 0 additions & 2 deletions acceptance/cmd/workspace/apps/run-local/script
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion acceptance/cmd/workspace/apps/run-local/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]+'
Expand Down
Loading