From 6ecf8a34f718e761bc27c0cefd7d8f03ddc3a468 Mon Sep 17 00:00:00 2001 From: Samika Kashyap Date: Wed, 22 May 2024 11:56:07 -0700 Subject: [PATCH] fix: provide db before service, order matters --- src/controllers/__tests__/request-controller.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/__tests__/request-controller.test.ts b/src/controllers/__tests__/request-controller.test.ts index 032b8868..0db82283 100644 --- a/src/controllers/__tests__/request-controller.test.ts +++ b/src/controllers/__tests__/request-controller.test.ts @@ -94,6 +94,7 @@ describe('createRequest', () => { .provideValue('dbConnection', dbConnection) .provideClass('metadataRepository', MetadataRepository) .provideFactory('requestRepository', RequestRepository.make) + .provideClass('replicationRequestRepository', ReplicationRequestRepository) .provideClass('anchorRepository', AnchorRepository) .provideClass('ipfsService', MockIpfsService) .provideFactory('merkleCarService', makeMerkleCarService) @@ -103,7 +104,6 @@ describe('createRequest', () => { .provideClass('anchorRequestParamsParser', AnchorRequestParamsParser) .provideClass('validationQueueService', ValidationSqsQueueService) .provideClass('requestService', RequestService) - .provideClass('replicationRequestRepository', ReplicationRequestRepository) .provideClass('requestController', RequestController) controller = container.resolve('requestController') }) @@ -374,6 +374,7 @@ describe('createRequest', () => { .provideValue('dbConnection', dbConnection) .provideClass('metadataRepository', MetadataRepository) .provideFactory('requestRepository', RequestRepository.make) + .provideClass('replicationRequestRepository', ReplicationRequestRepository) .provideClass('anchorRepository', AnchorRepository) .provideClass('ipfsService', MockIpfsService) .provideFactory('merkleCarService', makeMerkleCarService) @@ -383,7 +384,6 @@ describe('createRequest', () => { .provideClass('anchorRequestParamsParser', AnchorRequestParamsParser) .provideClass('validationQueueService', ValidationSqsQueueService) .provideClass('requestService', RequestService) - .provideClass('replicationRequestRepository', ReplicationRequestRepository) .provideClass('requestController', RequestController) controllerPublishingToQueue = container.resolve('requestController')