test: bump timeout

Specify timeout at the CLI e2e test suite level.
This commit is contained in:
jamesgeorge007
2024-11-06 18:53:39 +05:30
parent ecf5d9f6d2
commit 3fc43cc9b9

View File

@@ -6,7 +6,7 @@ import path from "path";
import { HoppErrorCode } from "../../../types/errors"; import { HoppErrorCode } from "../../../types/errors";
import { getErrorCode, getTestJsonFilePath, runCLI } from "../../utils"; import { getErrorCode, getTestJsonFilePath, runCLI } from "../../utils";
describe("hopp test [options] <file_path_or_id>", () => { describe("hopp test [options] <file_path_or_id>", { timeout: 100000 }, () => {
const VALID_TEST_ARGS = `test ${getTestJsonFilePath("passes-coll.json", "collection")}`; const VALID_TEST_ARGS = `test ${getTestJsonFilePath("passes-coll.json", "collection")}`;
describe("Test `hopp test <file_path_or_id>` command:", () => { describe("Test `hopp test <file_path_or_id>` command:", () => {
@@ -126,9 +126,7 @@ describe("hopp test [options] <file_path_or_id>", () => {
expect(error).toBeNull(); expect(error).toBeNull();
}); });
test( test("Successfully inherits/overrides authorization and headers at each level with multiple child collections", async () => {
"Successfully inherits/overrides authorization and headers at each level with multiple child collections",
async () => {
const args = `test ${getTestJsonFilePath( const args = `test ${getTestJsonFilePath(
"multiple-child-collections-auth-headers-coll.json", "multiple-child-collections-auth-headers-coll.json",
"collection" "collection"
@@ -136,9 +134,7 @@ describe("hopp test [options] <file_path_or_id>", () => {
const { error } = await runCLI(args); const { error } = await runCLI(args);
expect(error).toBeNull(); expect(error).toBeNull();
}, });
{ timeout: 100000 }
);
test("Persists environment variables set in the pre-request script for consumption in the test script", async () => { test("Persists environment variables set in the pre-request script for consumption in the test script", async () => {
const args = `test ${getTestJsonFilePath( const args = `test ${getTestJsonFilePath(
@@ -277,9 +273,7 @@ describe("hopp test [options] <file_path_or_id>", () => {
expect(error).toBeNull(); expect(error).toBeNull();
}); });
describe( describe("Secret environment variables", () => {
"Secret environment variables",
() => {
// Reads secret environment values from system environment // Reads secret environment values from system environment
test("Successfully picks the values for secret environment variables from `process.env` and persists the variables set from the pre-request script", async () => { test("Successfully picks the values for secret environment variables from `process.env` and persists the variables set from the pre-request script", async () => {
const env = { const env = {
@@ -365,9 +359,7 @@ describe("hopp test [options] <file_path_or_id>", () => {
const { error } = await runCLI(args); const { error } = await runCLI(args);
expect(error).toBeNull(); expect(error).toBeNull();
}); });
}, });
{ timeout: 50000 }
);
describe("Request variables", () => { describe("Request variables", () => {
test("Picks active request variables and ignores inactive entries alongside the usage of environment variables", async () => { test("Picks active request variables and ignores inactive entries alongside the usage of environment variables", async () => {