Skip to content

Commit

Permalink
[BACKPORT] Link fix 2.x (#764)
Browse files Browse the repository at this point in the history
* Remove redundant link

Signed-off-by: Simeon Widdis <[email protected]>

* Add local repository testing

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Simeon Widdis <[email protected]>
  • Loading branch information
Swiddis authored Jul 28, 2023
1 parent bb58331 commit 8c98142
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 8c98142

Please sign in to comment.