From 13e9cf0ed9841e83fa86c1465cba92fb28d4f966 Mon Sep 17 00:00:00 2001 From: izzy Date: Fri, 28 Nov 2025 12:50:30 +0000 Subject: [PATCH] stash: moving computers because pnpm is cooked --- e2e/src/api/specs/maintenance.e2e-spec.ts | 21 ++++++++++++++++--- .../src/controllers/maintenance.controller.ts | 2 +- .../src/services/maintenance.service.spec.ts | 3 +++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/e2e/src/api/specs/maintenance.e2e-spec.ts b/e2e/src/api/specs/maintenance.e2e-spec.ts index b6c7540bc5..73f46e5ee7 100644 --- a/e2e/src/api/specs/maintenance.e2e-spec.ts +++ b/e2e/src/api/specs/maintenance.e2e-spec.ts @@ -34,9 +34,24 @@ describe('/admin/maintenance', () => { }); }); + describe('POST /integrity/summary', async () => { + it('should report no issues', async () => { + const { status, body } = await request(app) + .get('/admin/maintenance/integrity/summary') + .set('Authorization', `Bearer ${admin.accessToken}`) + .send(); + expect(status).toBe(200); + expect(body).toEqual({ + missing_file: 0, + orphan_file: 0, + checksum_mismatch: 0, + }); + }); + }); + // => enter maintenance mode - describe.sequential('POST /', () => { + describe.skip.sequential('POST /', () => { it('should require authentication', async () => { const { status, body } = await request(app).post('/admin/maintenance').send({ action: 'end', @@ -93,7 +108,7 @@ describe('/admin/maintenance', () => { // => in maintenance mode - describe.sequential('in maintenance mode', () => { + describe.skip.sequential('in maintenance mode', () => { describe('GET ~/server/config', async () => { it('should indicate we are in maintenance mode', async () => { const { status, body } = await request(app).get('/server/config'); @@ -147,7 +162,7 @@ describe('/admin/maintenance', () => { // => exit maintenance mode - describe.sequential('POST /', () => { + describe.skip.sequential('POST /', () => { it('should exit maintenance mode', async () => { const { status } = await request(app).post('/admin/maintenance').set('cookie', cookie!).send({ action: 'end', diff --git a/server/src/controllers/maintenance.controller.ts b/server/src/controllers/maintenance.controller.ts index 8f0d7ab723..b41e892c61 100644 --- a/server/src/controllers/maintenance.controller.ts +++ b/server/src/controllers/maintenance.controller.ts @@ -62,7 +62,7 @@ export class MaintenanceController { }) @Authenticated({ permission: Permission.Maintenance, admin: true }) getIntegrityReportSummary(): Promise { - return this.service.getIntegrityReportSummary(); // + return this.service.getIntegrityReportSummary(); } @Post('integrity/report') diff --git a/server/src/services/maintenance.service.spec.ts b/server/src/services/maintenance.service.spec.ts index cc497a6ea4..5996d6b3c1 100644 --- a/server/src/services/maintenance.service.spec.ts +++ b/server/src/services/maintenance.service.spec.ts @@ -106,4 +106,7 @@ describe(MaintenanceService.name, () => { expect(mocks.systemMetadata.get).toHaveBeenCalledTimes(1); }); }); + + describe.skip('getIntegrityReportSummary'); // just calls repository + describe.skip('getIntegrityReport'); // just calls repository });