From 3f11f4715c5414b0ad180c22300658f7b6b91452 Mon Sep 17 00:00:00 2001 From: bruno Date: Fri, 24 Jul 2026 12:03:53 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20E2E=20port=20conflict=20=E2=80=94=202020?= =?UTF-8?q?=E2=86=922029=20+=20cleanup=20stale=20container?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Port 2020 already in use on CI runner - Changed to port 2029 in CI workflow + playwright config + test - Added docker rm -f obsigate-e2e before starting --- .gitea/workflows/ci.yml | 17 +++++++++-------- playwright.config.ts | 2 +- tests/e2e/obsigate.spec.ts | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9f16d8d..d6a01b9 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -125,14 +125,15 @@ jobs: -e VAULT_1_NAME=TestVault \ -e VAULT_1_PATH=/vaults/TestVault \ -e DIR_1_NAME=TestDir \ - -e DIR_1_PATH=/vaults/TestDir \ - -e OBSIGATE_AUTH_ENABLED=false \ - obsigate:ci - # Wait for health check - for i in $(seq 1 30); do - curl -s http://localhost:2020/api/health && break - sleep 1 - done + - name: Start ObsiGate + run: | + docker rm -f obsigate-e2e 2>/dev/null || true + docker run -d --name obsigate-e2e -p 2029:8080 -v $(pwd)/test_vault:/vaults/TestVault -v $(pwd)/test_dir:/vaults/TestDir -e VAULT_1_NAME=TestVault -e VAULT_1_PATH=/vaults/TestVault -e DIR_1_NAME=TestDir -e DIR_1_PATH=/vaults/TestDir -e OBSIGATE_AUTH_ENABLED=false obsigate:ci + # Wait for health check + for i in $(seq 1 30); do + curl -s http://localhost:2029/api/health && break + sleep 1 + done - name: Run E2E tests run: npx playwright test --project=chromium-desktop --reporter=list diff --git a/playwright.config.ts b/playwright.config.ts index 24b4296..b8019d6 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -11,7 +11,7 @@ export default defineConfig({ expect: { timeout: 10000 }, use: { - baseURL: process.env.BASE_URL || 'http://localhost:2020', + baseURL: process.env.BASE_URL || 'http://localhost:2029', trace: 'on-first-retry', screenshot: 'only-on-failure', }, diff --git a/tests/e2e/obsigate.spec.ts b/tests/e2e/obsigate.spec.ts index 6af65f5..405b176 100644 --- a/tests/e2e/obsigate.spec.ts +++ b/tests/e2e/obsigate.spec.ts @@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test'; -const BASE = process.env.BASE_URL || 'http://localhost:2020'; +const BASE = process.env.BASE_URL || 'http://localhost:2029'; // ── Helpers ────────────────────────────────────────────────────────── async function goHome(page) {