diff --git a/apps/server/src/modules/task/controller/api-test/task-copy-timeout.api.spec.ts b/apps/server/src/modules/task/controller/api-test/task-copy-timeout.api.spec.ts index f44a0f92fcb..1598874a56f 100644 --- a/apps/server/src/modules/task/controller/api-test/task-copy-timeout.api.spec.ts +++ b/apps/server/src/modules/task/controller/api-test/task-copy-timeout.api.spec.ts @@ -15,14 +15,14 @@ import { } from '@shared/testing'; import { Request } from 'express'; import request from 'supertest'; -// eslint-disable-next-line import/first -import { createMock } from '@golevelup/ts-jest'; -import { ServerTestModule } from '@modules/server/server.module'; -import { FilesStorageClientAdapterService } from '@src/modules/files-storage-client'; +// config must be set outside before the server module is imported, otherwise the configuration is already set Configuration.set('FEATURE_COPY_SERVICE_ENABLED', true); Configuration.set('INCOMING_REQUEST_TIMEOUT_COPY_API', 1); +// eslint-disable-next-line import/first +import { ServerTestModule } from '@modules/server/server.module'; + // This needs to be in a separate test file because of the above configuration. // When we find a way to mock the config, it should be moved alongside the other API tests. describe('Task copy (API)', () => { @@ -44,8 +44,6 @@ describe('Task copy (API)', () => { return true; }, }) - .overrideProvider(FilesStorageClientAdapterService) - .useValue(createMock()) .compile(); app = moduleFixture.createNestApplication();