This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new bda2fef  Add another container with reloading for faster testing
bda2fef is described below

commit bda2fef590d1b07064e3446dd8ccddbc95723827
Author: Sean B. Palmer <[email protected]>
AuthorDate: Thu Dec 11 20:28:45 2025 +0000

    Add another container with reloading for faster testing
---
 tests/docker-compose.yml | 39 +++++++++++++++++++++++++++++++++++++++
 tests/run-e2e-test.sh    | 16 +++++++++++-----
 tests/run-e2e.sh         | 14 +++++++++++---
 3 files changed, 61 insertions(+), 8 deletions(-)

diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml
index c56f19f..fd85a7c 100644
--- a/tests/docker-compose.yml
+++ b/tests/docker-compose.yml
@@ -18,6 +18,42 @@ services:
       retries: 30
       start_period: 10s
 
+  atr-dev:
+    build:
+      context: ..
+      dockerfile: Dockerfile.alpine
+    environment:
+      - ALLOW_TESTS=1
+      - APP_HOST=atr-dev:8080
+      - BIND=0.0.0.0:8080
+      - SECRET_KEY=insecure-test-key
+      - SSH_HOST=0.0.0.0
+    networks:
+      - test-network
+    volumes:
+      - ../atr:/opt/atr/atr
+      - ../start-dev.sh:/opt/atr/start-atr.sh
+      - atr-dev-state:/opt/atr/state
+    healthcheck:
+      test: ["CMD", "curl", "-k", "-f", "https://localhost:8080/";]
+      interval: 2s
+      timeout: 1s
+      retries: 30
+      start_period: 10s
+
+  e2e-dev:
+    build:
+      context: ..
+      dockerfile: tests/Dockerfile.e2e
+    depends_on:
+      atr-dev:
+        condition: service_healthy
+    networks:
+      - test-network
+    command: pytest e2e/ -v
+    environment:
+      - ATR_BASE_URL=https://atr-dev:8080
+
   playwright:
     build:
       context: ../playwright
@@ -47,3 +83,6 @@ services:
 networks:
   test-network:
     driver: bridge
+
+volumes:
+  atr-dev-state:
diff --git a/tests/run-e2e-test.sh b/tests/run-e2e-test.sh
index dda4fd8..5ab7dda 100755
--- a/tests/run-e2e-test.sh
+++ b/tests/run-e2e-test.sh
@@ -10,9 +10,15 @@ then
   exit 1
 fi
 
-echo "Building and running ATR e2e test: $1"
-docker compose build e2e
-docker compose up atr -d --build --wait
-docker compose run --rm e2e pytest "e2e/$1/" -v
+echo "Running ATR e2e test: $1 (with reload)"
 
-docker compose down -v
+if ! docker compose ps atr-dev --status running -q 2>/dev/null | grep -q .
+then
+  echo "Starting ATR dev container..."
+  docker compose up atr-dev -d --build --wait
+fi
+
+docker compose build e2e-dev
+docker compose run --rm e2e-dev pytest "e2e/$1/" -v
+
+echo "Use 'docker compose down atr-dev' to stop the dev container"
diff --git a/tests/run-e2e.sh b/tests/run-e2e.sh
index 58aee80..545fd49 100755
--- a/tests/run-e2e.sh
+++ b/tests/run-e2e.sh
@@ -3,7 +3,15 @@ set -eu
 
 cd "$(dirname "$0")"
 
-echo "Building and running ATR e2e tests..."
-docker compose up atr e2e --build --abort-on-container-exit --exit-code-from 
e2e
+echo "Running ATR e2e tests..."
 
-docker compose down -v
+if ! docker compose ps atr-dev --status running -q 2>/dev/null | grep -q .
+then
+  echo "Starting ATR dev container..."
+  docker compose up atr-dev -d --build --wait
+fi
+
+docker compose build e2e-dev
+docker compose run --rm e2e-dev pytest e2e/ -v
+
+echo "Use 'docker compose down atr-dev' to stop the dev container"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to