From 9b71a220dcf4b24a680f71abff493acd08442b3a Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Sat, 28 Jan 2023 00:33:24 +0100 Subject: [PATCH] catalog-backend: cleanup test Signed-off-by: Vincenzo Scamporlino --- .../service/DefaultEntitiesCatalog.test.ts | 76 ------------------- 1 file changed, 76 deletions(-) diff --git a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts index c2f1843845..bde55ef9bb 100644 --- a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts +++ b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts @@ -1527,82 +1527,6 @@ describe('DefaultEntitiesCatalog', () => { }, 60_000, ); - - it.each(databases.eachSupportedId())( - 'can match relations', - async databaseId => { - await createDatabase(databaseId); - - await addEntityToSearch({ - apiVersion: 'a', - kind: 'k', - metadata: { - name: 'one', - tags: ['java', 'rust'], - }, - spec: {}, - relations: [ - { - targetRef: 'targetRef', - type: 'ownedBy', - }, - ], - }); - await addEntityToSearch({ - apiVersion: 'a', - kind: 'k', - metadata: { - name: 'two', - tags: ['java', 'node'], - }, - spec: {}, - relations: [ - { - targetRef: 'anotherTargetRef', - type: 'ownedBy', - }, - { - targetRef: 'tt', - type: 'somethingelse', - }, - ], - }); - await addEntityToSearch({ - apiVersion: 'a', - kind: 'k', - metadata: { - name: 'three', - tags: ['go'], - }, - spec: {}, - relations: [ - { - targetRef: 'targetRef', - type: 'ownedBy', - }, - ], - }); - - const catalog = new DefaultEntitiesCatalog({ - database: knex, - logger: getVoidLogger(), - stitcher, - }); - - await expect( - catalog.facets({ - facets: ['relations.ownedBy'], - }), - ).resolves.toEqual({ - facets: { - 'relations.ownedBy': [ - { count: 1, value: 'anotherTargetRef' }, - { count: 2, value: 'targetRef' }, - ], - }, - }); - }, - ); }); });