Skip to content

Commit

Permalink
Add local repository testing
Browse files Browse the repository at this point in the history
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
  • Loading branch information
Swiddis committed Jul 27, 2023
1 parent 7c3b761 commit 32b7266
Showing 1 changed file with 22 additions and 0 deletions.
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 32b7266

Please sign in to comment.