Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Optimise indexation #294

Merged
merged 5 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as amqp from 'amqplib';
import {IAttributeDomain} from 'domain/attribute/attributeDomain';
import {ILibraryDomain} from 'domain/library/libraryDomain';
import {IRecordDomain} from 'domain/record/recordDomain';
import {IRecordRepo} from 'infra/record/recordRepo';
import {IConfig} from '_types/config';
import {IQueryInfos} from '_types/queryInfos';
import indexationManager from './indexationManagerDomain';
Expand Down Expand Up @@ -83,10 +82,6 @@ describe('Indexation Manager', () => {
});

test('index database', async () => {
const mockRecordRepo: Mockify<IRecordRepo> = {
updateRecord: jest.fn()
};

const mockRecordDomain: Mockify<IRecordDomain> = {
find: global.__mockPromise({
list: [
Expand All @@ -101,7 +96,8 @@ describe('Indexation Manager', () => {
};

const mockAttributeDomain: Mockify<IAttributeDomain> = {
getLibraryFullTextAttributes: global.__mockPromise([{id: 'id'}])
getLibraryFullTextAttributes: global.__mockPromise([{id: 'id'}]),
getLibraryAttributes: global.__mockPromise([{id: 'id'}])
};

const mockLibraryDomain: Mockify<ILibraryDomain> = {
Expand All @@ -120,7 +116,6 @@ describe('Indexation Manager', () => {
const indexation = indexationManager({
config: conf as IConfig,
'core.domain.record': mockRecordDomain as IRecordDomain,
'core.infra.record': mockRecordRepo as IRecordRepo,
'core.domain.attribute': mockAttributeDomain as IAttributeDomain,
'core.domain.library': mockLibraryDomain as ILibraryDomain,
'core.infra.indexation.indexationService': mockIndexationService as IIndexationService
Expand Down
Loading
Loading