Skip to content

Commit

Permalink
Re-apply fix for VPC type (opensearch-project#809) (opensearch-projec…
Browse files Browse the repository at this point in the history
…t#816)

* Fix VPC type

* Add a test case

* Re-apply link fix and update test

* Revert "Re-apply link fix and update test"

This reverts commit f2ec20d.

---------

(cherry picked from commit 0e9e8cd)

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 4e5afd7)
  • Loading branch information
opensearch-trigger-bot[bot] authored and A9 Swift Project User committed Sep 28, 2023
1 parent 3b355f6 commit d6bde64
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
4 changes: 2 additions & 2 deletions auto_sync_commit_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"last_github_commit": "b719ebc1badbfc684afd8ee95c89660e2cb79fc2",
"last_gitfarm_commit": "d4fd87e24165982ffd87d97ee70e1f1d52b71415"
"last_github_commit": "4e5afd7315877a731179b20a0dc69434e3c3f190",
"last_gitfarm_commit": "5406681515368a4651a807e02abff57b6a1dbb47"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
32 changes: 21 additions & 11 deletions server/adaptors/integrations/__test__/local_repository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
});

0 comments on commit d6bde64

Please sign in to comment.