feat(cli): add support for AWS Signature Authorization type (#4305)

This commit is contained in:
James George
2024-08-30 01:42:32 -07:00
committed by GitHub
parent 703b71de2c
commit 9ca899a28a
6 changed files with 231 additions and 6 deletions

View File

@@ -385,7 +385,6 @@ describe("hopp test [options] <file_path_or_id>", () => {
test("Supports the usage of request variables along with environment variables", async () => {
const env = {
...process.env,
secretBasicAuthUsernameEnvVar: "username",
secretBasicAuthPasswordEnvVar: "password",
};
@@ -407,6 +406,30 @@ describe("hopp test [options] <file_path_or_id>", () => {
expect(error).toBeNull();
});
});
describe("AWS Signature Authorization type", () => {
test("Successfully translates the authorization information to headers/query params and sends it along with the request", async () => {
const env = {
...process.env,
secretKey: "test-secret-key",
serviceToken: "test-token",
};
const COLL_PATH = getTestJsonFilePath(
"aws-signature-auth-coll.json",
"collection"
);
const ENVS_PATH = getTestJsonFilePath(
"aws-signature-auth-envs.json",
"environment"
);
const args = `test ${COLL_PATH} -e ${ENVS_PATH}`;
const { error } = await runCLI(args, { env });
expect(error).toBeNull();
});
});
});
describe("Test `hopp test <file_path_or_id> --delay <delay_in_ms>` command:", () => {