Skip to content

Commit

Permalink
fix(core/httpAuthSchemes): default sigv4aSigningRegionSet to undefined (
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe authored Aug 12, 2024
1 parent 03bb39f commit 8cccf59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { resolveAwsSdkSigV4AConfig } from "./resolveAwsSdkSigV4AConfig";

describe(resolveAwsSdkSigV4AConfig.name, () => {
it("should normalize provider but default to undefined value", async () => {
const config = resolveAwsSdkSigV4AConfig({});

expect(typeof config.sigv4aSigningRegionSet).toEqual("function");
expect(await config.sigv4aSigningRegionSet()).toEqual(undefined);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface AwsSdkSigV4AAuthResolvedConfig {
export const resolveAwsSdkSigV4AConfig = <T>(
config: T & AwsSdkSigV4AAuthInputConfig & AwsSdkSigV4APreviouslyResolved
): T & AwsSdkSigV4AAuthResolvedConfig => {
config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet ?? []);
config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet);
return config as T & AwsSdkSigV4AAuthResolvedConfig;
};

Expand Down

0 comments on commit 8cccf59

Please sign in to comment.