Skip to content

Commit c01660a

Browse files
committed
fix(healthcheck): update the tests
1 parent 899faf0 commit c01660a

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/swagger/specification.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,21 @@ exports.schema = {
3737
},
3838
},
3939
},
40+
healthCheck: {
41+
description: 'Health check endpoint',
42+
tags: ['Status'],
43+
body: {
44+
type: 'object',
45+
properties: {
46+
statusCode: {
47+
type: 'number',
48+
description: 'Status code',
49+
},
50+
status: {
51+
type: 'string',
52+
description: 'Status',
53+
},
54+
},
55+
},
56+
},
4057
};

test/functional/healthcheck.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const config = require('../../src/config/config.json');
55
// Server
66
describe('Health endpoint response', () => {
77
it('should return 200', (done) => {
8-
request.get(`http://localhost:${config.app.port}/_health`, (err, res) => {
8+
request.get(`http://localhost:${config.app.port}/${config.healthCheck.path}`, (err, res) => {
99
if (err) throw err;
1010
expect(res.statusCode).to.equal(200);
1111
done();

0 commit comments

Comments
 (0)