backend-app-api: httpRouter add healthCheckConfig

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2024-05-17 11:19:40 +02:00
parent 08a6bd7bc4
commit 8dc15aae58
@@ -162,6 +162,18 @@ describe('httpRouterFactory', () => {
});
});
it('should always allow the healthcheck endpoint', async () => {
const { server } = await startTestBackend({
features: [pluginSubject, ...defaultServices],
});
await expect(
request(server).get('/api/test/healthcheck'),
).resolves.toMatchObject({
status: 200,
});
});
it('should not block unauthenticated requests if default policy is disabled', async () => {
const { server } = await startTestBackend({
features: [