From cf4b9f406bfcde65025ac1796eb9cf257ded3619 Mon Sep 17 00:00:00 2001 From: river Date: Sun, 15 Mar 2026 13:36:32 +0000 Subject: [PATCH] fix: run tests with 1 worker to avoid race conditions --- run-test-frontend.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/run-test-frontend.sh b/run-test-frontend.sh index 56229a6..0ea4759 100755 --- a/run-test-frontend.sh +++ b/run-test-frontend.sh @@ -58,8 +58,9 @@ echo "๐Ÿ“ฆ Using compose file: $COMPOSE_FILE" echo "๐Ÿงน Cleaning up previous containers..." docker compose -f "$COMPOSE_FILE" down -v 2>/dev/null || true -# Build frontend with correct API base URL (force no cache) +# Build frontend with correct API base URL (force no cache, remove image first) echo "๐Ÿ”จ Building frontend..." +docker rmi harborforge-test-frontend:dev 2>/dev/null || true docker compose -f "$COMPOSE_FILE" build --no-cache --build-arg VITE_API_BASE=http://backend:8000 frontend # Start services @@ -87,7 +88,7 @@ echo "โœ… Services ready!" # Run test echo "๐Ÿงช Running test..." -docker compose -f "$COMPOSE_FILE" run --rm test +docker compose -f "$COMPOSE_FILE" run --rm -e WORKERS=1 test TEST_EXIT_CODE=$? # Cleanup decision based on expose-port