Skip to content

Commit e8eb85a

Browse files
committed
chnage tests directory structure
Signed-off-by: nadav mizrahi <nadav.mizrahi16@gmail.com>
1 parent 95034f6 commit e8eb85a

File tree

438 files changed

+5262
-2014
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

438 files changed

+5262
-2014
lines changed

.github/workflows/nightly-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
-e NEWAWSPROJSECRET=${{ secrets.NEWAWSPROJSECRET }} \
1616
-e NEWAZUREPROJKEY=${{ secrets.NEWAZUREPROJKEY }} \
1717
-e NEWAZUREPROJSECRET=${{ secrets.NEWAZUREPROJSECRET }} \
18-
--name test1 noobaa-tester ./src/test/unit_tests/run_npm_test_on_test_container.sh -s test_s3_ops.js
18+
--name test1 noobaa-tester ./src/test/framework/run_npm_test_on_test_container.sh -s test_s3_ops.js

Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ root-perm-test: tester
268268
@$(call create_docker_network)
269269
@$(call run_mongo)
270270
@echo "\033[1;34mRunning root permission tests\033[0m"
271-
$(CONTAINER_ENGINE) run $(CPUSET) --network noobaa-net --privileged --user root --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" --env "DB_TYPE=mongodb" --env "MONGODB_URL=mongodb://noobaa:noobaa@coretest-mongo-$(GIT_COMMIT)-$(NAME_POSTFIX)" $(TESTER_TAG) ./src/test/unit_tests/run_npm_test_on_test_container.sh -s sudo_index.js
271+
$(CONTAINER_ENGINE) run $(CPUSET) --network noobaa-net --privileged --user root --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" --env "DB_TYPE=mongodb" --env "MONGODB_URL=mongodb://noobaa:noobaa@coretest-mongo-$(GIT_COMMIT)-$(NAME_POSTFIX)" $(TESTER_TAG) ./src/test/framework/run_npm_test_on_test_container.sh -s utils/index/sudo_index.js
272272
@$(call stop_noobaa)
273273
@$(call stop_mongo)
274274
@$(call remove_docker_network)
@@ -280,7 +280,7 @@ run-single-test: tester
280280
@$(call run_mongo)
281281
@$(call run_blob_mock)
282282
@echo "\033[1;34mRunning tests\033[0m"
283-
$(CONTAINER_ENGINE) run $(CPUSET) --network noobaa-net --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" --env "DB_TYPE=mongodb" --env "MONGODB_URL=mongodb://noobaa:noobaa@coretest-mongo-$(GIT_COMMIT)-$(NAME_POSTFIX)" --env "BLOB_HOST=blob-mock-$(GIT_COMMIT)-$(NAME_POSTFIX)" --env "NOOBAA_LOG_LEVEL=all" $(TESTER_TAG) ./src/test/unit_tests/run_npm_test_on_test_container.sh -s $(testname)
283+
$(CONTAINER_ENGINE) run $(CPUSET) --network noobaa-net --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" --env "DB_TYPE=mongodb" --env "MONGODB_URL=mongodb://noobaa:noobaa@coretest-mongo-$(GIT_COMMIT)-$(NAME_POSTFIX)" --env "BLOB_HOST=blob-mock-$(GIT_COMMIT)-$(NAME_POSTFIX)" --env "NOOBAA_LOG_LEVEL=all" $(TESTER_TAG) ./src/test/framework/run_npm_test_on_test_container.sh -s $(testname)
284284
@$(call stop_noobaa)
285285
@$(call stop_blob_mock)
286286
@$(call stop_mongo)
@@ -290,7 +290,7 @@ run-single-test: tester
290290
run-nc-tests: tester
291291
@$(call create_docker_network)
292292
@echo "\033[1;34mRunning nc tests\033[0m"
293-
$(CONTAINER_ENGINE) run $(CPUSET) --network noobaa-net --privileged --user root --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "NC_CORETEST=true" $(TESTER_TAG) ./src/test/unit_tests/run_npm_test_on_test_container.sh -s nc_index.js
293+
$(CONTAINER_ENGINE) run $(CPUSET) --network noobaa-net --privileged --user root --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "NC_CORETEST=true" $(TESTER_TAG) ./src/test/framework/run_npm_test_on_test_container.sh -s utils/index/nc_index.js
294294
@$(call stop_noobaa)
295295
@$(call remove_docker_network)
296296
.PHONY: run-nc-tests
@@ -301,7 +301,7 @@ run-single-test-postgres: tester
301301
@$(call run_postgres)
302302
@$(call run_blob_mock)
303303
@echo "\033[1;34mRunning tests\033[0m"
304-
$(CONTAINER_ENGINE) run $(CPUSET) --network noobaa-net --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" --env "POSTGRES_HOST=coretest-postgres-$(GIT_COMMIT)-$(NAME_POSTFIX)" --env "POSTGRES_USER=noobaa" --env "DB_TYPE=postgres" --env "PG_ENABLE_QUERY_LOG=true" --env "PG_EXPLAIN_QUERIES=true" --env "BLOB_HOST=blob-mock-$(GIT_COMMIT)-$(NAME_POSTFIX)" $(TESTER_TAG) ./src/test/unit_tests/run_npm_test_on_test_container.sh -s $(testname)
304+
$(CONTAINER_ENGINE) run $(CPUSET) --network noobaa-net --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" --env "POSTGRES_HOST=coretest-postgres-$(GIT_COMMIT)-$(NAME_POSTFIX)" --env "POSTGRES_USER=noobaa" --env "DB_TYPE=postgres" --env "PG_ENABLE_QUERY_LOG=true" --env "PG_EXPLAIN_QUERIES=true" --env "BLOB_HOST=blob-mock-$(GIT_COMMIT)-$(NAME_POSTFIX)" $(TESTER_TAG) ./src/test/framework/run_npm_test_on_test_container.sh -s $(testname)
305305
@$(call stop_noobaa)
306306
@$(call stop_postgres)
307307
@$(call stop_blob_mock)
@@ -409,6 +409,16 @@ test-nsfs-cephs3: tester
409409
$(CONTAINER_ENGINE) run $(CPUSET) --privileged --user root --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" -v $(PWD)/logs:/logs $(TESTER_TAG) "./src/test/system_tests/ceph_s3_tests/run_ceph_nsfs_test_on_test_container.sh"
410410
.PHONY: test-nsfs-cephs3
411411

412+
test-system-tests: tester
413+
@echo "\033[1;34mRunning tests with Postgres.\033[0m"
414+
@$(call create_docker_network)
415+
@$(call run_postgres)
416+
@echo "\033[1;34mRunning tests\033[0m"
417+
$(CONTAINER_ENGINE) run $(CPUSET) --network noobaa-net --name noobaa_$(GIT_COMMIT)_$(NAME_POSTFIX) --env "SUPPRESS_LOGS=$(SUPPRESS_LOGS)" --env "POSTGRES_HOST=coretest-postgres-$(GIT_COMMIT)-$(NAME_POSTFIX)" --env "POSTGRES_USER=noobaa" --env "DB_TYPE=postgres" --env "POSTGRES_DBNAME=coretest" -v $(PWD)/logs:/logs $(TESTER_TAG) "./src/test/system_tests/run_system_tests_on_tests_container.sh"
418+
@$(call stop_noobaa)
419+
@$(call stop_postgres)
420+
@$(call remove_docker_network)
421+
412422
test-sanity: tester
413423
@echo "\033[1;34mRunning tests with Postgres.\033[0m"
414424
@$(call create_docker_network)

docs/NooBaaNonContainerized/CI&Tests.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ Run `NC mocha tests` with root permissions -
7676
* Run `NC mocha` tests **locally** -
7777
**Warning:** Running tests locally will do changes to your file system.
7878
* Run **all** NC mocha tests locally -
79-
Command: `sudo NC_CORETEST=true node node_modules/mocha/bin/mocha src/test/unit_tests/nc_index.js`.
79+
Command: `sudo NC_CORETEST=true node node_modules/mocha/bin/mocha src/test/utils/index/nc_index.js`.
8080

8181
* Run **a single** mocha test locally -
82-
Command: `sudo NC_CORETEST=true node node_modules/mocha/bin/mocha src/test/unit_tests/{test_name}.js`.
82+
Command: `sudo NC_CORETEST=true node node_modules/mocha/bin/mocha src/test/{test_type}/{test_name}.js`.
8383

8484
* Run `NC jest tests` -
8585
* Command: `sudo jest --testRegex=jest_tests/test_nc`.
@@ -162,10 +162,10 @@ Run `NSFS tests` with root permissions -
162162
* Run `NSFS mocha` tests **locally** -
163163
**Warning:** Running tests locally will do changes to your file system.
164164
* Run **all** NSFS mocha tests locally -
165-
Command: `sudo node node_modules/mocha/bin/mocha src/test/unit_tests/sudo_index.js`.
165+
Command: `sudo node node_modules/mocha/bin/mocha src/test/utils/index/sudo_index.js`.
166166

167167
* Run **a single** mocha test locally -
168-
Command: `sudo node node_modules/mocha/bin/mocha src/test/unit_tests/{test_name}.js`.
168+
Command: `sudo node node_modules/mocha/bin/mocha src/test/{test_type}/{test_name}.js`.
169169

170170

171171
#### NSFS Tests Files List

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"test": "npm run lint && npm run mocha",
2525
"ts": "tsc",
2626
"lint": "eslint src --quiet",
27-
"mocha": "node --allow-natives-syntax ./node_modules/.bin/_mocha src/test/unit_tests/index.js",
27+
"mocha": "node --allow-natives-syntax ./node_modules/.bin/_mocha src/test/utils/index/index.js",
2828
"jest": "sudo npx jest",
2929
"----": "-----------------------------------------------------------------",
3030
"start": "node --unhandled-rejections=warn src/cmd",

src/deploy/NVA_build/Tests.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ RUN mkdir -p /.npm && \
7272
chmod -R g=u /.npm
7373

7474
USER 10001:0
75-
CMD ["./src/test/unit_tests/run_npm_test_on_test_container.sh"]
75+
CMD ["./src/test/framework/run_npm_test_on_test_container.sh"]

src/test/unit_tests/different_clients/test_go_sdkv2_script.js renamed to src/test/different_clients/test_go_sdkv2_script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
process.env.DISABLE_INIT_RANDOM_SEED = "true";
66

77
// setup coretest first to prepare the env
8-
const coretest = require('../coretest');
8+
const coretest = require('../framework/coretest/coretest');
99
coretest.setup({ pools_to_create: [coretest.POOL_LIST[1]] });
1010
const { rpc_client, EMAIL } = coretest;
1111

1212
const mocha = require('mocha');
1313
const assert = require('assert');
14-
const config = require('../../../../config');
14+
const config = require('../../../config');
1515
const { run_go_sdk_v2_client_script } = require('./run_go_sdkv2_client_script');
1616

1717
mocha.describe('Go AWS SDK V2 Client script execution', function() {

src/test/unit_tests/run_npm_test_on_test_container.sh renamed to src/test/framework/run_npm_test_on_test_container.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ do
3838
command=${*}
3939
command_array=(${command})
4040
shift ${#command_array[@]};;
41-
-s|--single) command="./node_modules/mocha/bin/mocha.js src/test/unit_tests/${2}"
41+
-s|--single) command="./node_modules/mocha/bin/mocha.js src/test/${2}"
4242
shift 2;;
4343
*) usage;;
4444
esac

src/test/unit_tests/test_nc_iam_basic_integration.js renamed to src/test/integration_tests/api/iam/test_nc_iam_basic_integration.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const path = require('path');
77
const _ = require('lodash');
88
const mocha = require('mocha');
99
const assert = require('assert');
10-
const fs_utils = require('../../util/fs_utils');
10+
const fs_utils = require('../../../../util/fs_utils');
1111
const { TMP_PATH, generate_nsfs_account, get_new_buckets_path_by_test_env, generate_iam_client,
12-
get_coretest_path } = require('../system_tests/test_utils');
12+
require_coretest } = require('../../../system_tests/test_utils');
1313
const { ListUsersCommand, CreateUserCommand, GetUserCommand, UpdateUserCommand, DeleteUserCommand,
1414
ListAccessKeysCommand, CreateAccessKeyCommand, GetAccessKeyLastUsedCommand,
1515
UpdateAccessKeyCommand, DeleteAccessKeyCommand,
@@ -23,12 +23,11 @@ const { ListUsersCommand, CreateUserCommand, GetUserCommand, UpdateUserCommand,
2323
ListServerCertificateTagsCommand, ListServiceSpecificCredentialsCommand,
2424
ListSigningCertificatesCommand, ListSSHPublicKeysCommand, ListUserPoliciesCommand,
2525
ListUserTagsCommand, ListVirtualMFADevicesCommand } = require('@aws-sdk/client-iam');
26-
const { ACCESS_KEY_STATUS_ENUM } = require('../../endpoint/iam/iam_constants');
27-
const IamError = require('../../endpoint/iam/iam_errors').IamError;
26+
const { ACCESS_KEY_STATUS_ENUM } = require('../../../../endpoint/iam/iam_constants');
27+
const IamError = require('../../../../endpoint/iam/iam_errors').IamError;
2828

2929

30-
const coretest_path = get_coretest_path();
31-
const coretest = require(coretest_path);
30+
const coretest = require_coretest();
3231
const setup_options = { should_run_iam: true, https_port_iam: 7005, debug: 5 };
3332
coretest.setup(setup_options);
3433
const { rpc_client, EMAIL, get_current_setup_options, stop_nsfs_process, start_nsfs_process } = coretest;

src/test/unit_tests/test_bucket_logging.js renamed to src/test/integration_tests/api/s3/test_bucket_logging.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
const mocha = require('mocha');
55
const assert = require('assert');
66
const _ = require('lodash');
7-
const P = require('../../util/promise');
8-
const coretest = require('./coretest');
7+
const P = require('../../../../util/promise');
8+
const coretest = require('../../../utils/coretest/coretest');
99
const { rpc_client } = coretest; //, PASSWORD, SYSTEM
10-
const { BucketLogUploader } = require('../../server/bg_services/bucket_logs_upload');
10+
const { BucketLogUploader } = require('../../../../server/bg_services/bucket_logs_upload');
1111

1212
coretest.setup({ pools_to_create: [coretest.POOL_LIST[1]] });
1313

src/test/unit_tests/test_bucket_replication.js renamed to src/test/integration_tests/api/s3/test_bucket_replication.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
const mocha = require('mocha');
55
const assert = require('assert');
66
const _ = require('lodash');
7-
const P = require('../../util/promise');
8-
const coretest = require('./coretest');
7+
const P = require('../../../../util/promise');
8+
const coretest = require('../../../utils/coretest/coretest');
99
const { rpc_client, EMAIL } = coretest; //, PASSWORD, SYSTEM
1010
const util = require('util');
1111
const { NodeHttpHandler } = require("@smithy/node-http-handler");
1212
const { S3 } = require('@aws-sdk/client-s3');
1313
const http = require('http');
14-
const cloud_utils = require('../../util/cloud_utils');
15-
const { ReplicationScanner } = require('../../server/bg_services/replication_scanner');
16-
const { get_object } = require('../system_tests/test_utils');
14+
const cloud_utils = require('../../../../util/cloud_utils');
15+
const { ReplicationScanner } = require('../../../../server/bg_services/replication_scanner');
16+
const { get_object } = require('../../../system_tests/test_utils');
1717

18-
const db_client = require('../../util/db_client').instance();
18+
const db_client = require('../../../../util/db_client').instance();
1919
coretest.setup({ pools_to_create: [coretest.POOL_LIST[0]] });
2020

2121
mocha.describe('replication configuration validity tests', function() {
@@ -163,7 +163,7 @@ mocha.describe('replication collection tests', function() {
163163
const buckets = [bucket1, bucket2, bucket3];
164164
let replication_policy_id;
165165
// eslint-disable-next-line global-require
166-
const replication_store = require('../../server/system_services/replication_store').instance();
166+
const replication_store = require('../../../../server/system_services/replication_store').instance();
167167

168168
mocha.before('create buckets', async function() {
169169
await P.all(_.map(buckets, async bucket_name => {
@@ -384,7 +384,7 @@ mocha.describe('replication configuration bg worker tests', function() {
384384

385385
// delete object from dst
386386
await s3_owner.deleteObject({ Bucket: bucket_for_replications, Key: contents[0].Key });
387-
await _list_objects_and_wait(s3_owner, bucket_for_replications, uploaded_prefix_objects_count - 1); //Verify that one object was deleted
387+
await _list_objects_and_wait(s3_owner, bucket_for_replications, uploaded_prefix_objects_count - 1); //Verify that one object was deleted
388388
// sync again
389389
res1 = await scanner.run_batch();
390390
console.log('waiting for replication objects - one rule one prefix', res1);
@@ -397,7 +397,7 @@ mocha.describe('replication configuration bg worker tests', function() {
397397
console.log('objs override dst1', dst_obj1, dst_obj2);
398398

399399
assert.deepStrictEqual(dst_obj2.body, 'lalalala'); // dst object was updated correctly
400-
assert.notDeepStrictEqual(dst_obj1.body, dst_obj2.body); // new dst object was updated and
400+
assert.notDeepStrictEqual(dst_obj1.body, dst_obj2.body); // new dst object was updated and
401401
// now is diff from the original dst object
402402

403403
// sync again - should not replicate since dst bucket is last modified
@@ -407,7 +407,7 @@ mocha.describe('replication configuration bg worker tests', function() {
407407
const dst_obj3 = await get_object(s3_owner, bucket_for_replications, key1);
408408
const src_obj = await get_object(s3_owner, bucket1, key1);
409409
console.log('objs override dst2', src_obj, dst_obj3);
410-
assert.notDeepStrictEqual(src_obj.body, dst_obj3.body); // object in src !== object in dst
410+
assert.notDeepStrictEqual(src_obj.body, dst_obj3.body); // object in src !== object in dst
411411
assert.deepStrictEqual(dst_obj3.body, 'lalalala'); // dst object was not overridden by the object in the source
412412

413413

@@ -687,7 +687,7 @@ mocha.describe('Replication pagination test', function() {
687687
await delete_object(s3_owner, bucket_name, target_bucket_keys[i]);
688688
}
689689
await rpc_client.bucket.delete_bucket({ name: bucket_name });
690-
// Revert the replication scanner's
690+
// Revert the replication scanner's
691691
delete process.env.REPLICATION_MAX_KEYS;
692692
}));
693693
});

src/test/unit_tests/test_lifecycle.js renamed to src/test/integration_tests/api/s3/test_lifecycle.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ const crypto = require('crypto');
1515
const stream = require('stream');
1616
const moment = require('moment');
1717

18-
const ObjectIO = require('../../sdk/object_io');
19-
const P = require('../../util/promise');
20-
const config = require('../../../config');
21-
const MDStore = require('../../server/object_services/md_store').MDStore;
22-
const coretest = require('./coretest');
18+
const ObjectIO = require('../../../../sdk/object_io');
19+
const P = require('../../../../util/promise');
20+
const config = require('../../../../../config');
21+
const MDStore = require('../../../../server/object_services/md_store').MDStore;
22+
const coretest = require('../../../utils/coretest/coretest');
2323
coretest.setup({ pools_to_create: [coretest.POOL_LIST[1]] });
24-
const lifecycle = require('../../server/bg_services/lifecycle');
25-
const http_utils = require('../../util/http_utils');
26-
const test_utils = require('../../../src/test/system_tests/test_utils');
27-
const commonTests = require('../lifecycle/common');
24+
const lifecycle = require('../../../../server/bg_services/lifecycle');
25+
const http_utils = require('../../../../util/http_utils');
26+
const test_utils = require('../../../system_tests/test_utils');
27+
const commonTests = require('../../../lifecycle/common');
2828
const seed = crypto.randomBytes(16);
2929
const generator = crypto.createCipheriv('aes-128-gcm', seed, Buffer.alloc(12));
3030

src/test/unit_tests/test_namespace_auth.js renamed to src/test/integration_tests/api/s3/test_namespace_auth.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
/* eslint max-lines-per-function: ['error', 700] */
33
'use strict';
44
// setup coretest first to prepare the env
5-
const coretest = require('./coretest');
6-
const buffer_utils = require('../../util/buffer_utils');
5+
const coretest = require('../../../utils/coretest/coretest');
6+
const buffer_utils = require('../../../../util/buffer_utils');
77
coretest.setup({ pools_to_create: coretest.POOL_LIST });
88
const { S3 } = require('@aws-sdk/client-s3');
99
const { NodeHttpHandler } = require("@smithy/node-http-handler");
10-
const http_utils = require('../../util/http_utils');
10+
const http_utils = require('../../../../util/http_utils');
1111
const mocha = require('mocha');
1212
const assert = require('assert');
1313

@@ -18,7 +18,7 @@ const NAMESPACE_RESOURCE_NAME = 'nsr_auth';
1818
const NS_BUCKET = 'nsb';
1919
const BODY = "THE_MAJESTIC_SLOTH";
2020
const FKEY = 'ns_auth_file';
21-
const config = require('../../../config');
21+
const config = require('../../../../../config');
2222

2323
mocha.describe('Namespace Auth', function() {
2424

src/test/unit_tests/test_notifications.js renamed to src/test/integration_tests/api/s3/test_notifications.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ process.env.DISABLE_INIT_RANDOM_SEED = "true";
77
const fs = require('fs');
88
const path = require('path');
99

10-
const config = require('../../../config');
10+
const config = require('../../../../../config');
1111

1212
// setup coretest first to prepare the env
13-
const { get_coretest_path, generate_s3_client, TMP_PATH } = require('../system_tests/test_utils');
14-
const coretest_path = get_coretest_path();
15-
const coretest = require(coretest_path);
13+
const { require_coretest, generate_s3_client, TMP_PATH } = require('../../../system_tests/test_utils');
14+
const coretest = require_coretest();
1615

1716
const { rpc_client, EMAIL, POOL_LIST } = coretest;
1817

@@ -29,7 +28,7 @@ const mocha = require('mocha');
2928
const http = require('http');
3029
const assert = require('assert');
3130
const timer = require('node:timers/promises');
32-
const notifications_util = require('../../util/notifications_util');
31+
const notifications_util = require('../../../../util/notifications_util');
3332

3433
const http_connect_filename = 'http_connect.json';
3534
const http_connect_path = path.join(tmp_connect, http_connect_filename);

src/test/unit_tests/test_nsfs_versioning_gpfs.js renamed to src/test/integration_tests/api/s3/test_nsfs_versioning_gpfs.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ const path = require('path');
77
const mocha = require('mocha');
88
const crypto = require('crypto');
99
const assert = require('assert');
10-
const fs_utils = require('../../util/fs_utils');
11-
const nb_native = require('../../util/nb_native');
12-
const size_utils = require('../../util/size_utils');
13-
const NamespaceFS = require('../../sdk/namespace_fs');
14-
const buffer_utils = require('../../util/buffer_utils');
15-
const { get_process_fs_context } = require('../../util/native_fs_utils');
10+
const fs_utils = require('../../../../util/fs_utils');
11+
const nb_native = require('../../../../util/nb_native');
12+
const size_utils = require('../../../../util/size_utils');
13+
const NamespaceFS = require('../../../../sdk/namespace_fs');
14+
const buffer_utils = require('../../../../util/buffer_utils');
15+
const { get_process_fs_context } = require('../../../../util/native_fs_utils');
1616

1717
const XATTR_VERSION_ID = 'user.noobaa.version_id';
1818
const XATTR_PREV_VERSION_ID = 'user.noobaa.prev_version_id';

src/test/unit_tests/test_public_access_block.js renamed to src/test/integration_tests/api/s3/test_public_access_block.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ const http = require('http');
88
const crypto = require('crypto');
99
const { NodeHttpHandler } = require("@smithy/node-http-handler");
1010

11-
const { get_coretest_path } = require('../system_tests/test_utils');
12-
const coretest_path = get_coretest_path();
13-
const coretest = require(coretest_path);
14-
const { S3Error } = require('../../endpoint/s3/s3_errors');
15-
const config = require('../../../config');
11+
const { require_coretest } = require('../../../system_tests/test_utils');
12+
const coretest = require_coretest();
13+
const { S3Error } = require('../../../../endpoint/s3/s3_errors');
14+
const config = require('../../../../../config');
1615
const { rpc_client, EMAIL } = coretest; //, PASSWORD, SYSTEM
1716

1817
coretest.setup({ pools_to_create: process.env.NC_CORETEST ? undefined : [coretest.POOL_LIST[1]] });

0 commit comments

Comments
 (0)