Skip to content

Commit 04492fd

Browse files
committed
chore: simplify the test script, cleanup unnecessary CONFIG_FILE
1 parent a19d6ce commit 04492fd

3 files changed

Lines changed: 5 additions & 12 deletions

File tree

‎Dockerfile‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ RUN mkdir /data/
66

77
WORKDIR /data/
88

9-
COPY ./config/config.js /data/config.js
109
COPY ./process.json /data/process.json
1110

12-
ENV CONFIG_FILE=/data/config.js
13-
1411
# CMD ["pm2-runtime", "/data/process.json"]
1512
# workaround for issue https://github.com/Unitech/pm2/issues/4950
1613
CMD ["sh", "-c", "pm2 ps && pm2-runtime /data/process.json"]

‎Makefile‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,17 @@ test: test-integration
1111
.PHONY: test-integration
1212
test-integration:
1313
@echo "\nRunning integration tests..."
14-
@CONFIG_FILE=${ROOT}/config/config.js mocha test/api/init
15-
@PORT=3000 HOST=127.0.0.1 CONFIG_FILE=${ROOT}/config/config.js node bin/www &
16-
@CONFIG_FILE=${ROOT}/config/config.js mocha \
17-
test/api/users test/api/auth test/api/account test/api/accessKeys test/api/apps test/api/index --recursive --timeout 15000
14+
@mocha test/api/init
15+
@mocha test/api/users test/api/auth test/api/account test/api/accessKeys test/api/apps test/api/index --recursive --timeout 15000
1816

1917
.PHONY: coverage
2018
coverage:
2119
@echo "\n\nRunning coverage report..."
2220
rm -rf coverage
23-
@CONFIG_FILE=${ROOT}/config/config.js mocha test/api/init
24-
@PORT=3000 HOST=127.0.0.1 CONFIG_FILE=${ROOT}/config/config.js node bin/www &
25-
@CONFIG_FILE=${ROOT}/config/config.js ./node_modules/istanbul/lib/cli.js cover --report lcovonly --dir coverage/api ./node_modules/.bin/_mocha \
21+
@mocha test/api/init
22+
@./node_modules/istanbul/lib/cli.js cover --report lcovonly --dir coverage/api ./node_modules/.bin/_mocha \
2623
test/api/users test/api/auth test/api/account test/api/accessKeys test/api/apps test/api/index -- -R spec --recursive --timeout 15000
27-
@CONFIG_FILE=${ROOT}/config/config.js ./node_modules/istanbul/lib/cli.js report
24+
@./node_modules/istanbul/lib/cli.js report
2825

2926
.PHONY: build-docker
3027
build-docker:

‎package.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
"config",
8787
"core",
8888
"docs",
89-
"docker",
9089
"models",
9190
"public",
9291
"routes",

0 commit comments

Comments
 (0)