From 2d1e8f10b76eb9159126e1060999b4c1f5eef38c Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Tue, 6 Sep 2022 01:27:47 +0530 Subject: [PATCH] Support app params and docker params separately --- cypress/plugins/docker/index.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/cypress/plugins/docker/index.ts b/cypress/plugins/docker/index.ts index 024cb9d4..8a429b67 100644 --- a/cypress/plugins/docker/index.ts +++ b/cypress/plugins/docker/index.ts @@ -28,10 +28,12 @@ import PluginConfigOptions = Cypress.PluginConfigOptions; export function dockerRun(args: { image: string; containerName: string; - params?: string[]; + dockerParams?: string[]; + applicationParams?: string[]; }): Promise { const userInfo = os.userInfo(); - const params = args.params ?? []; + const params = args.dockerParams ?? []; + const appParams = args.applicationParams ?? []; if (userInfo.uid >= 0) { // On *nix we run the docker container as our uid:gid otherwise cleaning it up its media_store can be difficult @@ -45,10 +47,12 @@ export function dockerRun(args: { "-d", ...params, args.image, - "run", - ], (err, stdout) => { - console.log("error", err, "stdout", stdout); - if (err) reject(err); + ... appParams + ], (err, stdout, stderr) => { + console.log("error", err, "stdout", stdout, "stderr", stderr); + if (err) { + reject(err); + } resolve(stdout.trim()); }); });