File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,10 @@ ifeq ($(USE_HOSTNETWORK), true)
73
73
endif
74
74
75
75
# running blob mock on - all tests run OR on single test run of test_s3_ops.js
76
- NAMESPACE_BLOB_TEST? ="test_s3_ops.js"
76
+ NAMESPACE_BLOB_TEST? ="integration_tests/api/s3/ test_s3_ops.js"
77
77
RUN_BLOB_MOCK =true
78
- ifdef testname
79
- ifneq ("$(testname )", $(NAMESPACE_BLOB_TEST))
78
+ ifdef testpath
79
+ ifneq ("$(testpath )", $(NAMESPACE_BLOB_TEST))
80
80
RUN_BLOB_MOCK=false
81
81
endif
82
82
endif
@@ -280,7 +280,7 @@ run-single-test: tester
280
280
@$(call run_mongo)
281
281
@$(call run_blob_mock)
282
282
@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/framework/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 $(testpath )
284
284
@$(call stop_noobaa)
285
285
@$(call stop_blob_mock)
286
286
@$(call stop_mongo)
@@ -301,7 +301,7 @@ run-single-test-postgres: tester
301
301
@$(call run_postgres)
302
302
@$(call run_blob_mock)
303
303
@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/framework/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 $(testpath )
305
305
@$(call stop_noobaa)
306
306
@$(call stop_postgres)
307
307
@$(call stop_blob_mock)
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Run simply with `sudo NC_CORETEST=true node ./node_modules/mocha/bin/mocha .src/
10
10
More info can be found in [ CI & Tests] ( #ci--tests ) .
11
11
12
12
### B) Containerized deployment (With DB)
13
- One way is to run it with: ` make run-single-test testname= test_s3_bucket_policy.js `
13
+ One way is to run it with: ` make run-single-test testpath=integration_tests/api/s3/ test_s3_bucket_policy.js `
14
14
but it would take time to build the needed images, therefore we will focus on another way.
15
15
16
16
Another way is to create a postgres container and then run the test with the following steps:
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function usage() {
22
22
echo -e " Usage:\n\t${0} [options]"
23
23
echo -e " \t-c|--command - Replace the unit test command (default: ${command} )"
24
24
echo -e " \t-s|--single - Get the desired unit test to run and running it,"
25
- echo -e " \t needs to get the file name for example test_object_io.js"
25
+ echo -e " \t needs to get the relative path from the tests directory for example integration_tests/internal/ test_object_io.js"
26
26
exit 0
27
27
}
28
28
You can’t perform that action at this time.
0 commit comments