mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
stash: moving computers because pnpm is cooked
This commit is contained in:
@@ -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
|
// => enter maintenance mode
|
||||||
|
|
||||||
describe.sequential('POST /', () => {
|
describe.skip.sequential('POST /', () => {
|
||||||
it('should require authentication', async () => {
|
it('should require authentication', async () => {
|
||||||
const { status, body } = await request(app).post('/admin/maintenance').send({
|
const { status, body } = await request(app).post('/admin/maintenance').send({
|
||||||
action: 'end',
|
action: 'end',
|
||||||
@@ -93,7 +108,7 @@ describe('/admin/maintenance', () => {
|
|||||||
|
|
||||||
// => in maintenance mode
|
// => in maintenance mode
|
||||||
|
|
||||||
describe.sequential('in maintenance mode', () => {
|
describe.skip.sequential('in maintenance mode', () => {
|
||||||
describe('GET ~/server/config', async () => {
|
describe('GET ~/server/config', async () => {
|
||||||
it('should indicate we are in maintenance mode', async () => {
|
it('should indicate we are in maintenance mode', async () => {
|
||||||
const { status, body } = await request(app).get('/server/config');
|
const { status, body } = await request(app).get('/server/config');
|
||||||
@@ -147,7 +162,7 @@ describe('/admin/maintenance', () => {
|
|||||||
|
|
||||||
// => exit maintenance mode
|
// => exit maintenance mode
|
||||||
|
|
||||||
describe.sequential('POST /', () => {
|
describe.skip.sequential('POST /', () => {
|
||||||
it('should exit maintenance mode', async () => {
|
it('should exit maintenance mode', async () => {
|
||||||
const { status } = await request(app).post('/admin/maintenance').set('cookie', cookie!).send({
|
const { status } = await request(app).post('/admin/maintenance').set('cookie', cookie!).send({
|
||||||
action: 'end',
|
action: 'end',
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export class MaintenanceController {
|
|||||||
})
|
})
|
||||||
@Authenticated({ permission: Permission.Maintenance, admin: true })
|
@Authenticated({ permission: Permission.Maintenance, admin: true })
|
||||||
getIntegrityReportSummary(): Promise<MaintenanceIntegrityReportSummaryResponseDto> {
|
getIntegrityReportSummary(): Promise<MaintenanceIntegrityReportSummaryResponseDto> {
|
||||||
return this.service.getIntegrityReportSummary(); //
|
return this.service.getIntegrityReportSummary();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('integrity/report')
|
@Post('integrity/report')
|
||||||
|
|||||||
@@ -106,4 +106,7 @@ describe(MaintenanceService.name, () => {
|
|||||||
expect(mocks.systemMetadata.get).toHaveBeenCalledTimes(1);
|
expect(mocks.systemMetadata.get).toHaveBeenCalledTimes(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe.skip('getIntegrityReportSummary'); // just calls repository
|
||||||
|
describe.skip('getIntegrityReport'); // just calls repository
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user