Run npm install command

This commit is contained in:
Sander Declerck 2025-10-15 07:50:13 +02:00
parent 24bda852d0
commit b4f7d84563
No known key found for this signature in database
2 changed files with 9 additions and 15 deletions

View file

@ -4,7 +4,7 @@
"version": "1.0.0", "version": "1.0.0",
"description": "End-to-end tests for the Aikido Safe Chain", "description": "End-to-end tests for the Aikido Safe Chain",
"scripts": { "scripts": {
"test": "node --test --test-concurrency=1 **/*.spec.js" "test": "node --test --test-concurrency=1 **/safe-chain-proxy.e2e.spec.js"
}, },
"keywords": [], "keywords": [],
"author": "Aikido Security", "author": "Aikido Security",

View file

@ -63,7 +63,7 @@ describe("E2E: Safe chain proxy", () => {
// Polling until verdaccio is ready (max 30 seconds) // Polling until verdaccio is ready (max 30 seconds)
let verdaccioStarted = false; let verdaccioStarted = false;
for (let i = 0; i < 30; i++) { for (let i = 0; i < 60; i++) {
await new Promise((resolve) => setTimeout(resolve, 500)); await new Promise((resolve) => setTimeout(resolve, 500));
try { try {
const curlOutput = container.dockerExec( const curlOutput = container.dockerExec(
@ -71,7 +71,10 @@ describe("E2E: Safe chain proxy", () => {
); );
if (curlOutput.includes("200 OK")) { if (curlOutput.includes("200 OK")) {
verdaccioStarted = true; verdaccioStarted = true;
console.log("Verdaccio started, after " + i * 500 + "ms", curlOutput); console.log(
"Verdaccio started, after " + i * 500 + "ms\n",
curlOutput
);
break; break;
} }
} catch { } catch {
@ -82,19 +85,10 @@ describe("E2E: Safe chain proxy", () => {
assert.fail("Verdaccio did not start in time"); assert.fail("Verdaccio did not start in time");
} }
// const shell = await container.openShell("bash"); const shell = await container.openShell("bash");
// const result = await shell.runCommand( const result = await shell.runCommand("npm install lodash");
// "npm install lodash --registry=http://localhost:4873"
// );
// console.log("NPM install output:", result.output); console.log("NPM install output:\n", result.output);
// // const verdaccioLog = await container.openShell("bash");
// // const { output: logOutput } = await verdaccioLog.runCommand(
// // "cat /verdaccio.log"
// // );
// // console.log("Verdaccio log output:", logOutput);
// // Check if the installation was successful // // Check if the installation was successful
// assert( // assert(