Skip to content

Commit abe8dae

Browse files
committed
add timeouts
Signed-off-by: Romy <[email protected]>
1 parent f5bda99 commit abe8dae

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/test/unit_tests/jest_tests/test_nc_bucket_cli.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const os_util = require('../../../util/os_utils');
1010
const fs_utils = require('../../../util/fs_utils');
1111
const { ConfigFS } = require('../../../sdk/config_fs');
1212
const { set_path_permissions_and_owner, TMP_PATH, generate_s3_policy, CLI_UNSET_EMPTY_STRING,
13-
set_nc_config_dir_in_config } = require('../../system_tests/test_utils');
13+
set_nc_config_dir_in_config, TEST_TIMEOUT } = require('../../system_tests/test_utils');
1414
const { ACTIONS, TYPES } = require('../../../manage_nsfs/manage_nsfs_constants');
1515
const { get_process_fs_context, is_path_exists, get_bucket_tmpdir_full_path } = require('../../../util/native_fs_utils');
1616
const ManageCLIError = require('../../../manage_nsfs/manage_nsfs_cli_errors').ManageCLIError;
@@ -68,7 +68,7 @@ describe('manage nsfs cli bucket flow', () => {
6868
// account add (account 2 without new_buckets_path)
6969
const account_options2 = { config_root, ...account_defaults2 };
7070
await exec_manage_cli(TYPES.ACCOUNT, action, account_options2);
71-
});
71+
}, TEST_TIMEOUT);
7272

7373
afterEach(async () => {
7474
await fs_utils.folder_delete(`${config_root}`);
@@ -284,7 +284,7 @@ describe('manage nsfs cli bucket flow', () => {
284284
await fs_utils.create_fresh_path(bucket_path);
285285
await fs_utils.file_must_exist(bucket_path);
286286
await set_path_permissions_and_owner(bucket_path, account_options, 0o700);
287-
});
287+
}, TEST_TIMEOUT);
288288

289289
afterEach(async () => {
290290
await fs_utils.folder_delete(`${config_root}`);
@@ -474,7 +474,7 @@ describe('manage nsfs cli bucket flow', () => {
474474
const resp = await exec_manage_cli(TYPES.BUCKET, action, bucket_options);
475475
const bucket_resp = JSON.parse(resp);
476476
expect(bucket_resp.response.reply._id).not.toBeNull();
477-
});
477+
}, TEST_TIMEOUT);
478478

479479
afterEach(async () => {
480480
await fs_utils.folder_delete(`${config_root}`);
@@ -708,7 +708,7 @@ describe('manage nsfs cli bucket flow', () => {
708708
bucket_temp_dir_path = get_bucket_tmpdir_full_path(bucket_storage_path, bucket_resp.response.reply._id);
709709
await fs_utils.create_fresh_path(bucket_temp_dir_path);
710710
await fs_utils.file_must_exist(bucket_temp_dir_path);
711-
});
711+
}, TEST_TIMEOUT);
712712

713713
afterEach(async () => {
714714
await fs_utils.folder_delete(`${config_root}`);
@@ -827,7 +827,7 @@ describe('manage nsfs cli bucket flow', () => {
827827
const resp = await exec_manage_cli(TYPES.BUCKET, action, bucket_options);
828828
const bucket_resp = JSON.parse(resp);
829829
expect(bucket_resp.response.reply._id).not.toBeNull();
830-
});
830+
}, TEST_TIMEOUT);
831831

832832
afterEach(async () => {
833833
await fs_utils.folder_delete(`${config_root}`);
@@ -887,7 +887,7 @@ describe('manage nsfs cli bucket flow', () => {
887887
const resp = await exec_manage_cli(TYPES.BUCKET, action, bucket_options);
888888
const bucket_resp = JSON.parse(resp);
889889
expect(bucket_resp.response.reply._id).not.toBeNull();
890-
});
890+
}, TEST_TIMEOUT);
891891

892892
afterEach(async () => {
893893
await fs_utils.folder_delete(`${config_root}`);

src/test/unit_tests/test_nc_cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const { get_process_fs_context } = require('../../util/native_fs_utils');
1515
const { ManageCLIError } = require('../../manage_nsfs/manage_nsfs_cli_errors');
1616
const { ManageCLIResponse } = require('../../manage_nsfs/manage_nsfs_cli_responses');
1717
const { exec_manage_cli, generate_s3_policy, create_fs_user_by_platform, delete_fs_user_by_platform,
18-
set_path_permissions_and_owner, TMP_PATH, set_nc_config_dir_in_config } = require('../system_tests/test_utils');
18+
set_path_permissions_and_owner, TMP_PATH, set_nc_config_dir_in_config, TEST_TIMEOUT } = require('../system_tests/test_utils');
1919
const { TYPES, ACTIONS } = require('../../manage_nsfs/manage_nsfs_constants');
2020

2121
const tmp_fs_path = path.join(TMP_PATH, 'test_bucketspace_fs');
@@ -113,7 +113,7 @@ mocha.describe('manage_nsfs cli', function() {
113113
await fs_utils.file_must_exist(new_buckets_path2);
114114
await set_path_permissions_and_owner(new_buckets_path2, { uid: account_options2.uid, gid: account_options2.gid }, 0o700);
115115
await exec_manage_cli(TYPES.ACCOUNT, action, account_options2);
116-
});
116+
}, TEST_TIMEOUT);
117117

118118
mocha.it('cli bucket create - should fail bucket owner\'s allow_bucket_creation is false', async function() {
119119
const account_name_for_account_cannot_create_bucket = 'user3';

0 commit comments

Comments
 (0)