Skip to content

Commit

Permalink
Merge pull request #2362 from epam/fix/e2e_on_macos
Browse files Browse the repository at this point in the history
Podman on MacOS requires abs path for files outside of root dir
  • Loading branch information
siarheiyelin authored Jun 14, 2024
2 parents 666968a + 398697c commit 25c26ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion uui-e2e-tests/scripts/cmd/cmdRunPwDocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import { currentMachineIpv4 } from '../ipUtils';
import { getContainerEngineCmd } from '../containerEngineUtils';
import { readUuiSpecificEnvVariables } from '../envParamUtils';
import path from 'node:path';

const CONTAINER_ENGINE_CMD = getContainerEngineCmd();
const {
Expand Down Expand Up @@ -82,6 +83,7 @@ function getEnvParamsForDocker(): string[] {
}

function getVolumesMapArgs() {
const absPathToPreviewIds = forwardSlashes(path.resolve('../app/src/docs/_types/previewIds.ts'));
// files/folders to mount volumes
return [
'./scripts',
Expand All @@ -94,5 +96,9 @@ function getVolumesMapArgs() {
const to = `/e2e/${from.replace('./', '')}`;
acc.push('-v', `${from}:${to}`);
return acc;
}, []).concat(['-v', '../app/src/docs/_types/previewIds.ts:/app/src/docs/_types/previewIds.ts']);
}, []).concat(['-v', `${absPathToPreviewIds}:/app/src/docs/_types/previewIds.ts`]);
}

function forwardSlashes(pathStr: string) {
return pathStr.replace(/\\/g, '/');
}

0 comments on commit 25c26ca

Please sign in to comment.