Skip to content

Commit

Permalink
fix: configure elasticsearch to stop when testing
Browse files Browse the repository at this point in the history
- ํ…Œ์ŠคํŠธ๋ฅผ ์ง„ํ–‰ํ• ๋•Œ ์ˆœ์ˆ˜ ํ•จ์ˆ˜ ํ…Œ์ŠคํŠธ์ด๋ฏ€๋กœ elastic search์— ์—ฐ๊ฒฐํ•˜๋Š”
๊ณผ์ • ์ œ๊ฑฐ
  • Loading branch information
kgpyo committed Dec 18, 2019
1 parent 66054aa commit 3107ae6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apis/product/config/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const mongoosasticSettings = {
export const mongoosasticSettings = (process.env.NODE_ENV === 'test') ? {} : {
hosts: process.env.ELASTICSEARCH,
port: process.env.ESPORT,
bulk: {
Expand Down
2 changes: 1 addition & 1 deletion apis/product/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]
},
"scripts": {
"test": "jest --runInBand --setupFiles dotenv/config --forceExit",
"test": "NODE_ENV=test jest --runInBand --setupFiles dotenv/config --forceExit",
"precommit": "lint-staged && yarn test",
"dev:start": "nodemon --exec babel-node bin/www.js",
"build": "babel ./ -d build --copy-files '*.json'",
Expand Down

0 comments on commit 3107ae6

Please sign in to comment.