Skip to content

Commit

Permalink
chore(functional): add tests for supported fips endpoints (#2931)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Oct 25, 2021
1 parent f73d2f1 commit 28e1a8d
Show file tree
Hide file tree
Showing 3 changed files with 4,227 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/functional/endpoints/fips/index.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { join } from "path";

import testCases from "./test_cases_supported.json";

const getClientPackageName = (sdkId: string) =>
`client-${sdkId
.split(" ")
.map((word) => word.toLowerCase())
.join("-")}`;

describe("endpoints.fips", () => {
for (const { sdkId, region, signingRegion, hostname } of testCases) {
const clientPackageName = getClientPackageName(sdkId);
it(`testing "${clientPackageName}" with region: ${region}`, async () => {
const { defaultRegionInfoProvider } = await import(
join("..", "..", "..", "..", "clients", clientPackageName, "src", "endpoints")
);
const regionInfo = await defaultRegionInfoProvider(region);
expect(regionInfo.signingRegion).toEqual(signingRegion);
expect(regionInfo.hostname).toEqual(hostname);
});
}
});
Loading

0 comments on commit 28e1a8d

Please sign in to comment.