This commit is contained in:
Stan
2026-04-19 21:14:16 +02:00
parent 0c74a75126
commit 28d167f11f
42 changed files with 5681 additions and 55 deletions
+2 -2
View File
@@ -55,14 +55,14 @@ async function testApi() {
for (const baseUrl of candidates) {
try {
const health = await getJson(`${baseUrl}/api/health`);
const health = await getJson(`${baseUrl}/api/v1/health`);
assert.equal(health.statusCode, 200, `Unexpected health status from ${baseUrl}`);
assert.equal(health.json.status, 'ok', 'API health endpoint is not healthy');
assert.equal(health.json.service, 'check-list-poc-api', 'Unexpected API service name');
assert.equal(health.json.database, 'connected', 'API cannot reach MariaDB');
const templates = await getJson(`${baseUrl}/api/templates`);
const templates = await getJson(`${baseUrl}/api/v1/templates`);
assert.equal(templates.statusCode, 200, `Unexpected templates status from ${baseUrl}`);
assert.ok(Array.isArray(templates.json.items), 'Templates response must contain an items array');