fix: E2E port conflict — 2020→2029 + cleanup stale container
- 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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user