update docs and remove references to testcafe

This commit is contained in:
Lukas Hass
2022-02-18 16:11:26 +01:00
parent 3d86204db6
commit ed0e49d16e
7 changed files with 51 additions and 61 deletions
+1 -12
View File
@@ -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;
}