diff --git a/server/adaptors/integrations/__data__/repository/nginx/nginx-1.0.1.json b/server/adaptors/integrations/__data__/repository/nginx/nginx-1.0.1.json index 0a6105702..e6fccc7e3 100644 --- a/server/adaptors/integrations/__data__/repository/nginx/nginx-1.0.1.json +++ b/server/adaptors/integrations/__data__/repository/nginx/nginx-1.0.1.json @@ -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": { diff --git a/server/adaptors/integrations/__test__/local_repository.test.ts b/server/adaptors/integrations/__test__/local_repository.test.ts new file mode 100644 index 000000000..bfe3ce583 --- /dev/null +++ b/server/adaptors/integrations/__test__/local_repository.test.ts @@ -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())); + }); +});