mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 05:52:40 +00:00
Remove most of the geography module and delegate it to external gRPC microservice
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { RpcExceptionCode } from '@mobicoop/ddd-library';
|
||||
import { AD_ROUTE_PROVIDER } from '@modules/ad/ad.di-tokens';
|
||||
import { RouteProviderPort } from '@modules/ad/core/application/ports/route-provider.port';
|
||||
import { MatchingResult } from '@modules/ad/core/application/queries/match/match.query-handler';
|
||||
import { AlgorithmType } from '@modules/ad/core/application/types/algorithm.types';
|
||||
import { Frequency, Role } from '@modules/ad/core/domain/ad.types';
|
||||
@@ -17,6 +16,7 @@ import { CACHE_MANAGER } from '@nestjs/cache-manager';
|
||||
import { QueryBus } from '@nestjs/cqrs';
|
||||
import { RpcException } from '@nestjs/microservices';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { bareMockGeorouter } from '../georouter.mock';
|
||||
|
||||
const originWaypoint: WaypointDto = {
|
||||
position: 0,
|
||||
@@ -183,11 +183,6 @@ const mockQueryBus = {
|
||||
}),
|
||||
};
|
||||
|
||||
const mockRouteProvider: RouteProviderPort = {
|
||||
getBasic: jest.fn(),
|
||||
getDetailed: jest.fn(),
|
||||
};
|
||||
|
||||
const mockMatchMapper = {
|
||||
toResponse: jest.fn().mockImplementation(() => ({
|
||||
adId: '53a0bf71-4132-4f7b-a4cc-88c796b6bdf1',
|
||||
@@ -286,7 +281,7 @@ describe('Match Grpc Controller', () => {
|
||||
},
|
||||
{
|
||||
provide: AD_ROUTE_PROVIDER,
|
||||
useValue: mockRouteProvider,
|
||||
useValue: bareMockGeorouter,
|
||||
},
|
||||
{
|
||||
provide: MatchMapper,
|
||||
|
||||
Reference in New Issue
Block a user