Skip to content

Commit

Permalink
Merge branch 'main' into fix_integration_dashboard_loading_parse
Browse files Browse the repository at this point in the history
  • Loading branch information
YANG-DB committed Jul 28, 2023
2 parents a6704a6 + f9f1579 commit 47f14a7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"description": "Nginx HTTP server collector",
"license": "Apache-2.0",
"type": "logs",
"link": "https://www.nginx.com/",
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/nginx/info",
"statics": {
Expand Down
22 changes: 22 additions & 0 deletions server/adaptors/integrations/__test__/local_repository.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

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()));
});

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()));
});
});

0 comments on commit 47f14a7

Please sign in to comment.