Skip to content

Commit

Permalink
user docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
dianabarsan committed Sep 28, 2024
1 parent acc81de commit e8bfd0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/e2e/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const NETWORK = 'the_network';
const PROJECT_NAME = 'the_project';
process.env.NETWORK = NETWORK;
process.env.CHT_COMPOSE_PROJECT_NAME = PROJECT_NAME;
const DOCKER_COMPOSE_CLI = 'docker-compose';
const DOCKER_COMPOSE_FILE = path.resolve(__dirname, '..', 'test-data', 'docker-compose.test.yml');

const dockerComposeFolder = path.resolve(__dirname, '..', 'test-data', 'docker-compose');
Expand Down Expand Up @@ -68,14 +67,15 @@ const runScript = (file, ...args) => {
const dockerCommand = (files, ...params) => {
files = Array.isArray(files) ? files : [files];
const args = [
'compose',
...files.map(file => (['-f', file])),
...params.filter(param => param).map(param => param.split(' ')),
].flat();

console.log(DOCKER_COMPOSE_CLI, ...args);
console.log('docker', ...args);

return new Promise((resolve, reject) => {
const proc = spawn(DOCKER_COMPOSE_CLI, args, { env: { ...process.env, ...env } });
const proc = spawn('docker', args, { env: { ...process.env, ...env } });
proc.on('error', (err) => reject(err));

let err = '';
Expand Down
1 change: 0 additions & 1 deletion test/test-data/docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.9'
services:
cht-upgrade-service:
build: ../../
Expand Down

0 comments on commit e8bfd0f

Please sign in to comment.