stage 1
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user