Skip to content

Commit

Permalink
fix: run webpagereplay using the GUI adding --webpagereplay (#65)
Browse files Browse the repository at this point in the history
* fix: run webpagereplay using the GUI adding --webpagereplay
  • Loading branch information
soulgalore authored Jul 30, 2024
1 parent 11eed39 commit e63152b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions testrunner/src/testrunners/docker-testrunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ export default async function runJob(job) {
);

const parameters = setupDockerParameters(
job,
dockerContainer,
dockerExtraParameters,
workingDirectory,
configFileName,
resultFileName
resultFileName,
(job.data.extras && job.data.extras.includes('--webpagereplay')) ||
job.data.config.webpagereplay
);

if (job.data.scripting) {
Expand Down Expand Up @@ -150,12 +151,12 @@ async function handleScriptingFile(job, workingDirectory) {
}

function setupDockerParameters(
job,
dockerContainer,
dockerExtraParameters,
workingDirectory,
configFileName,
resultFileName
resultFileName,
usingWebPageReplay
) {
const baseParameters = [
'run',
Expand All @@ -172,9 +173,9 @@ function setupDockerParameters(
true
];

if (job.data.config.webpagereplay) {
baseParameters.splice(1, 0, '--cap-add=NET_ADMIN');
baseParameters.splice(2, 0, '-e', 'REPLAY=true', '-e', 'LATENCY=100');
//
if (usingWebPageReplay) {
baseParameters.splice(1, 0, '-e', 'REPLAY=true', '-e', 'LATENCY=100');
}
return baseParameters;
}
Expand Down

0 comments on commit e63152b

Please sign in to comment.