mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(server): keep system config transformations (#13796)
This commit is contained in:
parent
2c86da07c6
commit
37e437a568
2 changed files with 27 additions and 5 deletions
|
|
@ -237,6 +237,24 @@ describe(SystemConfigService.name, () => {
|
|||
expect(systemMock.readFile).toHaveBeenCalledWith('immich-config.json');
|
||||
});
|
||||
|
||||
it('should transform booleans', async () => {
|
||||
configMock.getEnv.mockReturnValue(mockEnvData({ configFile: 'immich-config.json' }));
|
||||
systemMock.readFile.mockResolvedValue(JSON.stringify({ ffmpeg: { twoPass: 'false' } }));
|
||||
|
||||
await expect(sut.getSystemConfig()).resolves.toMatchObject({
|
||||
ffmpeg: expect.objectContaining({ twoPass: false }),
|
||||
});
|
||||
});
|
||||
|
||||
it('should transform numbers', async () => {
|
||||
configMock.getEnv.mockReturnValue(mockEnvData({ configFile: 'immich-config.json' }));
|
||||
systemMock.readFile.mockResolvedValue(JSON.stringify({ ffmpeg: { threads: '42' } }));
|
||||
|
||||
await expect(sut.getSystemConfig()).resolves.toMatchObject({
|
||||
ffmpeg: expect.objectContaining({ threads: 42 }),
|
||||
});
|
||||
});
|
||||
|
||||
it('should log errors with the config file', async () => {
|
||||
configMock.getEnv.mockReturnValue(mockEnvData({ configFile: 'immich-config.json' }));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue