fix health check

This commit is contained in:
Felix Ableitner 2025-01-13 16:07:01 +01:00
parent 2be56b7373
commit 47638ccddd
2 changed files with 4 additions and 4 deletions

View file

@ -41,8 +41,8 @@ afterAll(async () => {
}); });
test("Upload image and delete it", async () => { test("Upload image and delete it", async () => {
const healthz = await fetch(alphaUrl + "/pictrs/healthz"); const health = await alpha.imageHealth();
expect(healthz.status).toBe(200); expect(health.success).toBeTruthy();
// Before running this test, you need to delete all previous images in the DB // Before running this test, you need to delete all previous images in the DB
await deleteAllImages(alpha); await deleteAllImages(alpha);

View file

@ -428,8 +428,8 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) {
.route(delete().to(delete_image)), .route(delete().to(delete_image)),
) )
.route("/proxy", get().to(image_proxy)) .route("/proxy", get().to(image_proxy))
.route("/{filename}", get().to(get_image)) .route("/health", get().to(pictrs_health))
.route("/health", get().to(pictrs_health)), .route("/{filename}", get().to(get_image)),
), ),
); );
} }