update docs and remove references to testcafe
This commit is contained in:
@@ -8,23 +8,12 @@ const path = require("path");
|
||||
const fs = require('fs');
|
||||
|
||||
/**
|
||||
* Execute Docker compose, passing the correct host directory (in case this is run from the TestCafe container)
|
||||
* Execute Docker compose, passing the correct host directory
|
||||
*/
|
||||
export function dockerCompose(command: string): void {
|
||||
let param = '';
|
||||
const projectDir = process.env.PROJECT_DIR;
|
||||
const overrideDockerCompose = process.env.OVERRIDE_DOCKER_COMPOSE;
|
||||
|
||||
if (!projectDir && fs.existsSync('/project')) {
|
||||
// We are probably in the docker-image AND we did not pass PROJECT_DIR env variable
|
||||
throw new Error('Incorrect docker-compose command used to fire testcafe tests. You need to add a PROJECT_DIR environment variable. Please refer to the CONTRIBUTING.md guide');
|
||||
}
|
||||
|
||||
if (projectDir) {
|
||||
const dirName = path.basename(projectDir);
|
||||
param = '--project-name '+dirName+' --project-directory '+projectDir;
|
||||
}
|
||||
|
||||
if (overrideDockerCompose) {
|
||||
param += ' -f docker-compose.yaml -f '+overrideDockerCompose;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user