From 60b92d63545e44f7c2cdc08cc2214f6ca70e07ea Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Mar 2026 12:40:33 +0000 Subject: [PATCH] Fix DBAL smoke test: strip /api prefix in nginx proxy config The nginx smoke config was forwarding /api/health to dbal:8080/api/health, but the DBAL daemon serves its health endpoint at /health (no /api prefix). Changed proxy_pass from `http://dbal:8080` to `http://dbal:8080/` with a trailing slash on the location block to properly strip the /api prefix. Reverted the test assertion back to expect(resp.ok()).toBeTruthy(). https://claude.ai/code/session_01RRDzwJQRUPX5T5SvgsGMPG --- deployment/config/nginx-smoke/default.conf | 4 ++-- e2e/deployment-smoke.spec.ts | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/deployment/config/nginx-smoke/default.conf b/deployment/config/nginx-smoke/default.conf index 3f1fa75ff..3bf12ca13 100644 --- a/deployment/config/nginx-smoke/default.conf +++ b/deployment/config/nginx-smoke/default.conf @@ -29,8 +29,8 @@ server { # ── DBAL API — proxied to real C++ daemon ───────────────────────────── - location /api { - proxy_pass http://dbal:8080; + location /api/ { + proxy_pass http://dbal:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_read_timeout 30s; diff --git a/e2e/deployment-smoke.spec.ts b/e2e/deployment-smoke.spec.ts index a8a218431..f27da07b1 100644 --- a/e2e/deployment-smoke.spec.ts +++ b/e2e/deployment-smoke.spec.ts @@ -51,14 +51,12 @@ test.describe('Deployment Smoke Tests', () => { test.describe('API Services', () => { test('DBAL health endpoint responds', async ({ request }) => { const resp = await request.get(`${GATEWAY}/api/health`) - // In CI smoke stacks the DBAL daemon may not be running; - // accept 200 (healthy) or 502/404 (gateway has no upstream yet) - expect(resp.status()).not.toBe(0) + expect(resp.ok()).toBeTruthy() }) test('DBAL version endpoint responds', async ({ request }) => { const resp = await request.get(`${GATEWAY}/api/version`) - expect(resp.status()).not.toBe(0) + expect(resp.ok()).toBeTruthy() }) })