Add health-checking endpoint on '/health' that always returns 200 (#2992)

* Add health-checker endpoint on '/health' that always returns 200OK

* Refactor health handler, add tests

* Refactor health test
This commit is contained in:
Kirill Kravinsky
2016-11-02 20:33:59 -04:00
committed by Florent Vilmart
parent b347bff641
commit 908c48098a
3 changed files with 13 additions and 2 deletions

View File

@@ -164,6 +164,15 @@ describe('server', () => {
})
});
it('can respond 200 on path health', done => {
request.get({
url: 'http://localhost:8378/1/health',
}, (error, response, body) => {
expect(response.statusCode).toBe(200);
done();
});
});
it('can create a parse-server v1', done => {
var parseServer = new ParseServer.default(Object.assign({},
defaultConfiguration, {