From 627955734907d8210a84acdb153c732c7eb11131 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Mon, 5 Oct 2026 00:52:07 +0000 Subject: [PATCH 1/2] fix: route Playwright through the shared proxy Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- docker-compose.yml | 2 ++ tests/worker/contract.bats | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 131043b..60673b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -132,6 +132,8 @@ services: command: sleep infinity depends_on: - nextcloud + extra_hosts: + - "${NEXTCLOUD_HOST:-${COMPOSE_PROJECT_NAME}.localhost}:host-gateway" restart: unless-stopped networks: - default diff --git a/tests/worker/contract.bats b/tests/worker/contract.bats index b1ab07c..41abff2 100644 --- a/tests/worker/contract.bats +++ b/tests/worker/contract.bats @@ -112,3 +112,11 @@ setup() { [[ "$output" == *"VIRTUAL_HOST: example.test"* ]] } + + +@test "Playwright resolves the public Nextcloud hostname through the Docker host" { + run env DB_TYPE=sqlite COMPOSE_PROFILES=playwright sh "$WORKER" playwright-route config + [ "$status" -eq 0 ] + [[ "$output" == *"PLAYWRIGHT_BASE_URL: https://ncdev-playwright-route.localhost"* ]] + [[ "$output" == *"ncdev-playwright-route.localhost:host-gateway"* ]] +} From 190a171912836e9c9f156cc90e857b7fd8a11bf8 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Mon, 5 Oct 2026 00:55:29 +0000 Subject: [PATCH 2/2] test: avoid depending on Compose extra_hosts formatting Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- tests/worker/contract.bats | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/worker/contract.bats b/tests/worker/contract.bats index 41abff2..a8123e3 100644 --- a/tests/worker/contract.bats +++ b/tests/worker/contract.bats @@ -118,5 +118,6 @@ setup() { run env DB_TYPE=sqlite COMPOSE_PROFILES=playwright sh "$WORKER" playwright-route config [ "$status" -eq 0 ] [[ "$output" == *"PLAYWRIGHT_BASE_URL: https://ncdev-playwright-route.localhost"* ]] - [[ "$output" == *"ncdev-playwright-route.localhost:host-gateway"* ]] + [[ "$output" == *"ncdev-playwright-route.localhost"* ]] + [[ "$output" == *"host-gateway"* ]] }