diff --git a/auto_sync_commit_metadata.json b/auto_sync_commit_metadata.json index d57d18560..8c7e618f8 100644 --- a/auto_sync_commit_metadata.json +++ b/auto_sync_commit_metadata.json @@ -1,4 +1,4 @@ { - "last_github_commit": "b719ebc1badbfc684afd8ee95c89660e2cb79fc2", - "last_gitfarm_commit": "d4fd87e24165982ffd87d97ee70e1f1d52b71415" + "last_github_commit": "4e5afd7315877a731179b20a0dc69434e3c3f190", + "last_gitfarm_commit": "5406681515368a4651a807e02abff57b6a1dbb47" } \ No newline at end of file diff --git a/server/adaptors/integrations/__data__/repository/aws_vpc_flow/aws_vpc_flow-1.0.0.json b/server/adaptors/integrations/__data__/repository/aws_vpc_flow/aws_vpc_flow-1.0.0.json index f665c9cc2..86e8a9b03 100644 --- a/server/adaptors/integrations/__data__/repository/aws_vpc_flow/aws_vpc_flow-1.0.0.json +++ b/server/adaptors/integrations/__data__/repository/aws_vpc_flow/aws_vpc_flow-1.0.0.json @@ -4,7 +4,7 @@ "displayName": "AWS VPC Flow", "description": "AWS VPC Flow log collector", "license": "Apache-2.0", - "type": "logs", + "type": "logs_vpc", "author": "Haidong Wang", "sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/aws_vpc_flow/info", "statics": { diff --git a/server/adaptors/integrations/__test__/local_repository.test.ts b/server/adaptors/integrations/__test__/local_repository.test.ts index bfe3ce583..246aa7e82 100644 --- a/server/adaptors/integrations/__test__/local_repository.test.ts +++ b/server/adaptors/integrations/__test__/local_repository.test.ts @@ -7,16 +7,26 @@ import { Repository } from '../repository/repository'; import { Integration } from '../repository/integration'; import path from 'path'; -describe("The local repository", () => { - it("Should pass shallow validation for all local integrations.", async () => { - let repository: Repository = new Repository(path.join(__dirname, '../__data__/repository')); - let integrations: Integration[] = await repository.getIntegrationList(); - await Promise.all(integrations.map(i => expect(i.check()).resolves.toBeTruthy())); - }); +describe('The local repository', () => { + it('Should pass shallow validation for all local integrations.', async () => { + const repository: Repository = new Repository(path.join(__dirname, '../__data__/repository')); + const integrations: Integration[] = await repository.getIntegrationList(); + await Promise.all(integrations.map((i) => expect(i.check()).resolves.toBeTruthy())); + }); - it("Should pass deep validation for all local integrations.", async () => { - let repository: Repository = new Repository(path.join(__dirname, '../__data__/repository')); - let integrations: Integration[] = await repository.getIntegrationList(); - await Promise.all(integrations.map(i => expect(i.deepCheck()).resolves.toBeTruthy())); - }); + it('Should pass deep validation for all local integrations.', async () => { + const repository: Repository = new Repository(path.join(__dirname, '../__data__/repository')); + const integrations: Integration[] = await repository.getIntegrationList(); + await Promise.all(integrations.map((i) => expect(i.deepCheck()).resolves.toBeTruthy())); + }); + + it('Should not have a type that is not imported in the config', async () => { + const repository: Repository = new Repository(path.join(__dirname, '../__data__/repository')); + const integrations: Integration[] = await repository.getIntegrationList(); + for (const integration of integrations) { + const config = await integration.getConfig(); + const components = config!.components.map((x) => x.name); + expect(components).toContain(config!.type); + } + }); });