mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Run npm install command
This commit is contained in:
parent
24bda852d0
commit
b4f7d84563
2 changed files with 9 additions and 15 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue