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_NAME=TestVault \
|
||||||
-e VAULT_1_PATH=/vaults/TestVault \
|
-e VAULT_1_PATH=/vaults/TestVault \
|
||||||
-e DIR_1_NAME=TestDir \
|
-e DIR_1_NAME=TestDir \
|
||||||
-e DIR_1_PATH=/vaults/TestDir \
|
- name: Start ObsiGate
|
||||||
-e OBSIGATE_AUTH_ENABLED=false \
|
run: |
|
||||||
obsigate:ci
|
docker rm -f obsigate-e2e 2>/dev/null || true
|
||||||
# Wait for health check
|
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
|
||||||
for i in $(seq 1 30); do
|
# Wait for health check
|
||||||
curl -s http://localhost:2020/api/health && break
|
for i in $(seq 1 30); do
|
||||||
sleep 1
|
curl -s http://localhost:2029/api/health && break
|
||||||
done
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
- name: Run E2E tests
|
- name: Run E2E tests
|
||||||
run: npx playwright test --project=chromium-desktop --reporter=list
|
run: npx playwright test --project=chromium-desktop --reporter=list
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export default defineConfig({
|
|||||||
expect: { timeout: 10000 },
|
expect: { timeout: 10000 },
|
||||||
|
|
||||||
use: {
|
use: {
|
||||||
baseURL: process.env.BASE_URL || 'http://localhost:2020',
|
baseURL: process.env.BASE_URL || 'http://localhost:2029',
|
||||||
trace: 'on-first-retry',
|
trace: 'on-first-retry',
|
||||||
screenshot: 'only-on-failure',
|
screenshot: 'only-on-failure',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import { test, expect } from '@playwright/test';
|
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 ──────────────────────────────────────────────────────────
|
// ── Helpers ──────────────────────────────────────────────────────────
|
||||||
async function goHome(page) {
|
async function goHome(page) {
|
||||||
|
|||||||
Reference in New Issue
Block a user