mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user