Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
fix(routes): Add a /__lbheartbeat__ route. (#1807) r=vladikoff
Browse files Browse the repository at this point in the history
  • Loading branch information
rfk authored and vladikoff committed Apr 10, 2017
1 parent 9ac11ac commit 89f5cac
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/routes/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ module.exports = (log, db) => {
)
}
},
{
method: 'GET',
path: '/__lbheartbeat__',
handler: function heartbeat(request, reply) {
log.begin('Defaults.lbheartbeat', request)
reply({})
}
},
{
method: '*',
path: '/v0/{p*}',
Expand Down
18 changes: 18 additions & 0 deletions test/remote/misc_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,24 @@ describe('remote misc', function() {
}
)

it(
'/__heartbeat__ returns a 200 OK',
() => {
return request(config.publicUrl + '/__heartbeat__').spread((res) => {
assert.equal(res.statusCode, 200, 'http ok')
})
}
)

it(
'/__lbheartbeat__ returns a 200 OK',
() => {
return request(config.publicUrl + '/__lbheartbeat__').spread((res) => {
assert.equal(res.statusCode, 200, 'http ok')
})
}
)

it(
'/ returns version, git hash and source repo',
testVersionRoute('/')
Expand Down

0 comments on commit 89f5cac

Please sign in to comment.