From b4f7d845631e9b52c53b888827c0d70aaed07fdd Mon Sep 17 00:00:00 2001 From: Sander Declerck Date: Wed, 15 Oct 2025 07:50:13 +0200 Subject: [PATCH] Run npm install command --- test/e2e/package.json | 2 +- test/e2e/safe-chain-proxy.e2e.spec.js | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/test/e2e/package.json b/test/e2e/package.json index 9217808..b34fd0b 100644 --- a/test/e2e/package.json +++ b/test/e2e/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "description": "End-to-end tests for the Aikido Safe Chain", "scripts": { - "test": "node --test --test-concurrency=1 **/*.spec.js" + "test": "node --test --test-concurrency=1 **/safe-chain-proxy.e2e.spec.js" }, "keywords": [], "author": "Aikido Security", diff --git a/test/e2e/safe-chain-proxy.e2e.spec.js b/test/e2e/safe-chain-proxy.e2e.spec.js index 518390c..fb4b61d 100644 --- a/test/e2e/safe-chain-proxy.e2e.spec.js +++ b/test/e2e/safe-chain-proxy.e2e.spec.js @@ -63,7 +63,7 @@ describe("E2E: Safe chain proxy", () => { // Polling until verdaccio is ready (max 30 seconds) let verdaccioStarted = false; - for (let i = 0; i < 30; i++) { + for (let i = 0; i < 60; i++) { await new Promise((resolve) => setTimeout(resolve, 500)); try { const curlOutput = container.dockerExec( @@ -71,7 +71,10 @@ describe("E2E: Safe chain proxy", () => { ); if (curlOutput.includes("200 OK")) { verdaccioStarted = true; - console.log("Verdaccio started, after " + i * 500 + "ms", curlOutput); + console.log( + "Verdaccio started, after " + i * 500 + "ms\n", + curlOutput + ); break; } } catch { @@ -82,19 +85,10 @@ describe("E2E: Safe chain proxy", () => { assert.fail("Verdaccio did not start in time"); } - // const shell = await container.openShell("bash"); - // const result = await shell.runCommand( - // "npm install lodash --registry=http://localhost:4873" - // ); + const shell = await container.openShell("bash"); + const result = await shell.runCommand("npm install lodash"); - // console.log("NPM install output:", result.output); - - // // const verdaccioLog = await container.openShell("bash"); - // // const { output: logOutput } = await verdaccioLog.runCommand( - // // "cat /verdaccio.log" - // // ); - - // // console.log("Verdaccio log output:", logOutput); + console.log("NPM install output:\n", result.output); // // Check if the installation was successful // assert(