@applitools/docker-compose-mocha
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -12,2 +12,3 @@ // @flow | ||
const getShell = require('./lib/shell'); | ||
const dockerStartByServiceName = require('./lib/docker-start-by-service-name'); | ||
@@ -125,3 +126,3 @@ const dockerStopByServiceName = require('./lib/docker-stop-by-service-name'); | ||
await exec(`docker compose -p ${runNameSpecific} -f "${pathToComposeFile}" up -d ${onlyTheseServicesMessageCommandAddition}`, | ||
envVars ? { env: { PATH: process.env.PATH, ...envVars }, shell: '/bin/zsh' } : {}); | ||
envVars ? { env: { PATH: process.env.PATH, ...envVars }, shell: getShell() } : {}); | ||
@@ -128,0 +129,0 @@ if (!process.env.NOSPIN) { |
const { exec } = require('child-process-promise'); | ||
const getShell = require('./shell'); | ||
@@ -10,3 +11,3 @@ /** | ||
const command = `docker compose -p ${runName} -f "${pathToCompose}" ps`; | ||
const result = await exec(command, { shell: '/bin/zsh' }); | ||
const result = await exec(command, { shell: getShell() }); | ||
const lines = result.stdout.split('\n'); | ||
@@ -13,0 +14,0 @@ const exist = lines.find((element) => { |
// @flow | ||
const { exec } = require('child-process-promise'); | ||
const getShell = require('./shell'); | ||
@@ -9,5 +10,5 @@ async function dockerPauseByServiceName(runNameSpecific/* : string */, | ||
const commandExec = `docker compose -p ${runNameSpecific} -f "${pathToComposeFile}" pause ${serviceName}`; | ||
return exec(commandExec, { shell: '/bin/zsh' }); | ||
return exec(commandExec, { shell: getShell() }); | ||
} | ||
module.exports = dockerPauseByServiceName; |
// @flow | ||
const { exec } = require('child-process-promise'); | ||
const getShell = require('./shell'); | ||
@@ -9,5 +10,5 @@ async function dockerStartByServiceName(runNameSpecific/* : string */, | ||
const commandExec = `docker compose -p ${runNameSpecific} -f "${pathToComposeFile}" start ${serviceName}`; | ||
return exec(commandExec, { shell: '/bin/zsh' }); | ||
return exec(commandExec, { shell: getShell() }); | ||
} | ||
module.exports = dockerStartByServiceName; |
// @flow | ||
const { exec } = require('child-process-promise'); | ||
const getShell = require('./shell'); | ||
@@ -9,5 +10,5 @@ async function dockerStopByServiceName(runNameSpecific/* : string */, | ||
const commandExec = `docker compose -p ${runNameSpecific} -f "${pathToComposeFile}" stop ${serviceName}`; | ||
return exec(commandExec, { shell: '/bin/zsh' }); | ||
return exec(commandExec, { shell: getShell() }); | ||
} | ||
module.exports = dockerStopByServiceName; |
// @flow | ||
const { exec } = require('child-process-promise'); | ||
const getShell = require('./shell'); | ||
@@ -9,5 +10,5 @@ async function dockerUnpauseByServiceName(runNameSpecific/* : string */, | ||
const commandExec = `docker compose -p ${runNameSpecific} -f "${pathToComposeFile}" unpause ${serviceName}`; | ||
return exec(commandExec, { shell: '/bin/zsh' }); | ||
return exec(commandExec, { shell: getShell() }); | ||
} | ||
module.exports = dockerUnpauseByServiceName; |
@@ -8,2 +8,3 @@ // @flow | ||
const getShell = require('./shell'); | ||
const extractTimestampFromName = require('./extract-timestamp-from-name'); | ||
@@ -71,3 +72,3 @@ const extractContainerIdFromName = require('./extract-container-id-from-name'); | ||
await exec(`docker compose -p ${envName} -f "${pathToComposeFile}" ${brutallyKill ? 'kill' : 'down'}`, envVars ? { shell: '/bin/zsh', env: { PATH: process.env.PATH, ...envVars } } : { shell: '/bin/zsh' }); | ||
await exec(`docker compose -p ${envName} -f "${pathToComposeFile}" ${brutallyKill ? 'kill' : 'down'}`, envVars ? { shell: getShell(), env: { PATH: process.env.PATH, ...envVars } } : { shell: getShell() }); | ||
@@ -85,3 +86,3 @@ const consoleMessageDispose = `Disposing of ${envDisplayName} environment.. `; | ||
await exec(`docker compose -p ${envName} -f "${pathToComposeFile}" down -v`, envVars ? { shell: '/bin/zsh', env: { PATH: process.env.PATH, ...envVars } } : { shell: '/bin/zsh' }); | ||
await exec(`docker compose -p ${envName} -f "${pathToComposeFile}" down -v`, envVars ? { shell: getShell(), env: { PATH: process.env.PATH, ...envVars } } : { shell: getShell() }); | ||
if (!process.env.NOSPIN) { | ||
@@ -88,0 +89,0 @@ spinner2.stop(); |
// @flow | ||
const childProcess = require('child-process-promise'); | ||
const getShell = require('./shell'); | ||
@@ -11,3 +12,3 @@ async function getAddressForService(runName, pathToCompose, serviceName, originalPort) { | ||
} | ||
const result = await exec(`docker compose -p ${runName} -f "${pathToCompose}" port ${serviceName} ${originalPort}`, { shell: '/bin/zsh' }); | ||
const result = await exec(`docker compose -p ${runName} -f "${pathToCompose}" port ${serviceName} ${originalPort}`, { shell: getShell() }); | ||
return result.stdout.replace('\n', ''); | ||
@@ -14,0 +15,0 @@ } |
const { exec } = require('child-process-promise'); | ||
const getShell = require('./shell'); | ||
module.exports = async function (runName, pathToCompose, serviceName) { | ||
return (await exec(`docker compose -p ${runName} -f "${pathToCompose}" logs ${serviceName}`, { shell: '/bin/zsh' })).stdout; | ||
return (await exec(`docker compose -p ${runName} -f "${pathToCompose}" logs ${serviceName}`, { shell: getShell() })).stdout; | ||
}; |
{ | ||
"name": "@applitools/docker-compose-mocha", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Tool used for setting up an isolated environment for end to end testing / integration testing using Docker Compose", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,2 +16,3 @@ const { expect } = require('chai'); | ||
const pullTools = require('../../lib/docker-pull-image-by-name'); | ||
const getShell = require('../../lib/shell'); | ||
@@ -216,3 +217,3 @@ let envName = ''; | ||
const moreThan20MinutesOldProjectName = getRandomEnvironmentName(chance, 35).envName; | ||
await exec(`docker compose -p ${moreThan20MinutesOldProjectName} -f ${pathToCompose} up -d`, { shell: '/bin/zsh' }); | ||
await exec(`docker compose -p ${moreThan20MinutesOldProjectName} -f ${pathToCompose} up -d`, { shell: getShell() }); | ||
@@ -219,0 +220,0 @@ const resultDct1 = await main.getAddressForService(moreThan20MinutesOldProjectName, pathToCompose, 'dct_s1', 3001); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54632
39
959