From 604987599e08acc862e5331c99b347651d1f0612 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Tue, 5 Oct 2021 09:30:43 +0200 Subject: [PATCH] chore: Adds missing method to mocked catalog APIs Signed-off-by: Johan Haals --- .../auth-backend/src/lib/catalog/CatalogIdentityClient.test.ts | 1 + plugins/auth-backend/src/providers/aws-alb/provider.test.ts | 1 + plugins/badges-backend/src/service/router.test.ts | 1 + .../src/components/CatalogGraphCard/CatalogGraphCard.test.tsx | 1 + .../src/components/CatalogGraphPage/CatalogGraphPage.test.tsx | 1 + .../EntityRelationsGraph/EntityRelationsGraph.test.tsx | 1 + .../src/components/EntityRelationsGraph/useEntityStore.test.ts | 1 + plugins/catalog-import/src/api/CatalogImportClient.test.ts | 1 + .../StepPrepareCreatePullRequest.test.tsx | 1 + .../components/DefaultExplorePage/DefaultExplorePage.test.tsx | 1 + .../DomainExplorerContent/DomainExplorerContent.test.tsx | 1 + .../GroupsExplorerContent/GroupsExplorerContent.test.tsx | 1 + plugins/fossa/src/components/FossaPage/FossaPage.test.tsx | 1 + plugins/todo-backend/src/service/TodoReaderService.test.ts | 1 + 14 files changed, 14 insertions(+) diff --git a/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.test.ts b/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.test.ts index 5dd3c768bb..0ddcaa6d2c 100644 --- a/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.test.ts +++ b/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.test.ts @@ -34,6 +34,7 @@ describe('CatalogIdentityClient', () => { getLocationByEntity: jest.fn(), removeEntityByUid: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; const tokenIssuer: jest.Mocked = { issueToken: jest.fn(), diff --git a/plugins/auth-backend/src/providers/aws-alb/provider.test.ts b/plugins/auth-backend/src/providers/aws-alb/provider.test.ts index c9647176cd..ca4e521316 100644 --- a/plugins/auth-backend/src/providers/aws-alb/provider.test.ts +++ b/plugins/auth-backend/src/providers/aws-alb/provider.test.ts @@ -77,6 +77,7 @@ describe('AwsALBAuthProvider', () => { removeEntityByUid: jest.fn(), getEntityByName: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; const mockRequest = { diff --git a/plugins/badges-backend/src/service/router.test.ts b/plugins/badges-backend/src/service/router.test.ts index 5dc877ec32..51ad1e7e11 100644 --- a/plugins/badges-backend/src/service/router.test.ts +++ b/plugins/badges-backend/src/service/router.test.ts @@ -67,6 +67,7 @@ describe('createRouter', () => { removeLocationById: jest.fn(), removeEntityByUid: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; config = new ConfigReader({ diff --git a/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.test.tsx b/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.test.tsx index 8207517e03..7e3149fef7 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.test.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.test.tsx @@ -57,6 +57,7 @@ describe('', () => { addLocation: jest.fn(), removeLocationById: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; apis = ApiRegistry.with(catalogApiRef, catalog); diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.test.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.test.tsx index c291faadbd..8b467a017e 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.test.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.test.tsx @@ -87,6 +87,7 @@ describe('', () => { addLocation: jest.fn(), removeLocationById: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; const apis = ApiRegistry.with(catalogApiRef, catalog); diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.test.tsx b/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.test.tsx index fe3bef3e84..2d6c5cc93d 100644 --- a/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.test.tsx +++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.test.tsx @@ -156,6 +156,7 @@ describe('', () => { addLocation: jest.fn(), removeLocationById: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; const apis = ApiRegistry.with(catalogApiRef, catalog); diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.test.ts b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.test.ts index 2675469c15..a60750bab5 100644 --- a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.test.ts +++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.test.ts @@ -37,6 +37,7 @@ describe('useEntityStore', () => { addLocation: jest.fn(), removeLocationById: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; useApi.mockReturnValue(catalogApi); diff --git a/plugins/catalog-import/src/api/CatalogImportClient.test.ts b/plugins/catalog-import/src/api/CatalogImportClient.test.ts index 373acd4b5f..0ddd92e121 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.test.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.test.ts @@ -105,6 +105,7 @@ describe('CatalogImportClient', () => { getLocationById: jest.fn(), removeEntityByUid: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; let catalogImportClient: CatalogImportClient; diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.test.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.test.tsx index 2c4dd54f9e..0a55d6337b 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.test.tsx +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.test.tsx @@ -45,6 +45,7 @@ describe('', () => { removeLocationById: jest.fn(), removeEntityByUid: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; const errorApi: jest.Mocked = { diff --git a/plugins/explore/src/components/DefaultExplorePage/DefaultExplorePage.test.tsx b/plugins/explore/src/components/DefaultExplorePage/DefaultExplorePage.test.tsx index 84b922bef5..8927cf088b 100644 --- a/plugins/explore/src/components/DefaultExplorePage/DefaultExplorePage.test.tsx +++ b/plugins/explore/src/components/DefaultExplorePage/DefaultExplorePage.test.tsx @@ -32,6 +32,7 @@ describe('', () => { removeEntityByUid: jest.fn(), getEntityByName: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; const Wrapper = ({ children }: { children?: React.ReactNode }) => ( diff --git a/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.test.tsx b/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.test.tsx index 5fd2b02ee9..d78fc0428d 100644 --- a/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.test.tsx +++ b/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.test.tsx @@ -34,6 +34,7 @@ describe('', () => { removeEntityByUid: jest.fn(), getEntityByName: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; const Wrapper = ({ children }: { children?: React.ReactNode }) => ( diff --git a/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.test.tsx b/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.test.tsx index 56dfd59aa8..f0815e0116 100644 --- a/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.test.tsx +++ b/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.test.tsx @@ -33,6 +33,7 @@ describe('', () => { removeEntityByUid: jest.fn(), getEntityByName: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; const Wrapper = ({ children }: { children?: React.ReactNode }) => ( diff --git a/plugins/fossa/src/components/FossaPage/FossaPage.test.tsx b/plugins/fossa/src/components/FossaPage/FossaPage.test.tsx index c7fca26a3b..78c8b7bb40 100644 --- a/plugins/fossa/src/components/FossaPage/FossaPage.test.tsx +++ b/plugins/fossa/src/components/FossaPage/FossaPage.test.tsx @@ -37,6 +37,7 @@ describe('', () => { removeEntityByUid: jest.fn(), removeLocationById: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; const fossaApi: jest.Mocked = { getFindingSummary: jest.fn(), diff --git a/plugins/todo-backend/src/service/TodoReaderService.test.ts b/plugins/todo-backend/src/service/TodoReaderService.test.ts index 777fb0acf3..3d86a1726b 100644 --- a/plugins/todo-backend/src/service/TodoReaderService.test.ts +++ b/plugins/todo-backend/src/service/TodoReaderService.test.ts @@ -51,6 +51,7 @@ function mockCatalogClient(entity?: Entity): jest.Mocked { removeLocationById: jest.fn(), removeEntityByUid: jest.fn(), refreshEntity: jest.fn(), + getEntityAncestors: jest.fn(), }; if (entity) { mock.getEntityByName.mockReturnValue(entity);