Skip to content

Commit

Permalink
feat: update integrating test docker-compose version
Browse files Browse the repository at this point in the history
  • Loading branch information
chasewoo committed Aug 24, 2024
1 parent c3f0542 commit 6069636
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 13 deletions.
7 changes: 5 additions & 2 deletions apps/server/integration-testing/global-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ const dockerCompose = require('docker-compose');
const isPortReachable = require('is-port-reachable');

module.exports = async () => {
process.env.MONGO_URI = 'mongodb://localhost:20000/shukun_test';
const dockerComposeVersion = await dockerCompose.v2.version();
// eslint-disable-next-line no-console
console.log('dockerComposeVersion', dockerComposeVersion);

process.env.MONGO_URI = 'mongodb://localhost:20000/shukun_test';
const isDBReachable = await isPortReachable(20000);

if (!isDBReachable) {
await dockerCompose.upAll({
await dockerCompose.v2.upAll({
cwd: path.join(__dirname),
log: true,
verbose: true,
Expand Down
40 changes: 30 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@vitest/ui": "^1.0.0",
"babel-jest": "29.4.3",
"css-loader": "^6.4.0",
"docker-compose": "^0.23.17",
"docker-compose": "^0.24.8",
"eslint": "8.48.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "^2.5.0",
Expand Down

0 comments on commit 6069636

Please sign in to comment.