fix(ci): e2e - fixtures de test versionnees + acces via passerelle docker (dind)
- test_vault/ et test_dir/ : fixtures markdown pour les tests E2E Playwright (22 fichiers, .obsigate-backup ignore) - ci.yml e2e : health check et BASE_URL via IP passerelle docker (localhost du job container ne voit pas le port publie sur l hote) - ci.yml e2e : l etape Start ObsiGate echoue explicitement si l app n est pas joignable
This commit is contained in:
+11
-2
@@ -134,14 +134,23 @@ jobs:
|
||||
-e DIR_1_PATH=/vaults/TestDir \
|
||||
-e OBSIGATE_AUTH_ENABLED=false \
|
||||
obsigate:ci
|
||||
# Docker-in-docker : le port publié est joignable via l'IP de la
|
||||
# passerelle (localhost dans le job container ne voit pas le port
|
||||
# publié sur l'hôte).
|
||||
GW=$(ip route show default | awk '{print $3}' || echo 172.17.0.1)
|
||||
echo "Gateway IP: $GW"
|
||||
# Wait for health check
|
||||
for i in $(seq 1 30); do
|
||||
curl -s http://localhost:2029/api/health && break
|
||||
if curl -sf "http://$GW:2029/api/health"; then echo "Health OK"; break; fi
|
||||
sleep 1
|
||||
done
|
||||
curl -sf "http://$GW:2029/api/health" >/dev/null || { echo "App not reachable at $GW:2029"; exit 1; }
|
||||
|
||||
- name: Run E2E tests
|
||||
run: npx playwright test --project=chromium-desktop --reporter=list
|
||||
run: |
|
||||
GW=$(ip route show default | awk '{print $3}' || echo 172.17.0.1)
|
||||
echo "Using BASE_URL=http://$GW:2029"
|
||||
BASE_URL="http://$GW:2029" npx playwright test --project=chromium-desktop --reporter=list
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
|
||||
Reference in New Issue
Block a user