Add Health/Recommendations/Request/Webhook controllers

This commit is contained in:
2026-08-12 21:21:26 +02:00
parent 3c5f723d22
commit e712470013
8 changed files with 313 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { describe, expect, it } from 'vitest';
import Fastify from 'fastify';
import { HealthController } from '../../../src/app/controllers/HealthController';
import type { AppConfig } from '../../../src/app/config/AppConfig';
describe('HealthController', () => {
it('reports status ok with llm/radarr flags from config', async () => {
const app = Fastify();
new HealthController({ LLM_ENABLED: true, RADARR_ENABLED: false } as AppConfig).register(app);
const res = await app.inject({ method: 'GET', url: '/health' });
expect(res.statusCode).toBe(200);
expect(res.json()).toEqual({ status: 'ok', llm: true, radarr: false });
});
});