mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Without safe-chain
This commit is contained in:
parent
1f2d4e86c7
commit
3aec473755
1 changed files with 29 additions and 29 deletions
|
|
@ -14,8 +14,8 @@ describe("E2E: Safe chain proxy", () => {
|
|||
container = new DockerTestContainer();
|
||||
await container.start();
|
||||
|
||||
const installationShell = await container.openShell("zsh");
|
||||
await installationShell.runCommand("safe-chain setup");
|
||||
// const installationShell = await container.openShell("zsh");
|
||||
// await installationShell.runCommand("safe-chain setup");
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
|
|
@ -26,37 +26,37 @@ describe("E2E: Safe chain proxy", () => {
|
|||
}
|
||||
});
|
||||
|
||||
it(`safe-chain proxy respects upstream proxy settings`, async () => {
|
||||
// Configure and start a proxy inside the container
|
||||
const proxy = await container.openShell("zsh");
|
||||
await proxy.runCommand(
|
||||
`echo 'BasicAuth user password' >> /etc/tinyproxy/tinyproxy.conf`
|
||||
);
|
||||
await proxy.runCommand("tinyproxy");
|
||||
// it(`safe-chain proxy respects upstream proxy settings`, async () => {
|
||||
// // Configure and start a proxy inside the container
|
||||
// const proxy = await container.openShell("zsh");
|
||||
// await proxy.runCommand(
|
||||
// `echo 'BasicAuth user password' >> /etc/tinyproxy/tinyproxy.conf`
|
||||
// );
|
||||
// await proxy.runCommand("tinyproxy");
|
||||
|
||||
const shell = await container.openShell("zsh");
|
||||
await shell.runCommand(
|
||||
'export HTTPS_PROXY="http://user:password@localhost:8888"'
|
||||
);
|
||||
const { output } = await shell.runCommand("npm install axios");
|
||||
// const shell = await container.openShell("zsh");
|
||||
// await shell.runCommand(
|
||||
// 'export HTTPS_PROXY="http://user:password@localhost:8888"'
|
||||
// );
|
||||
// const { output } = await shell.runCommand("npm install axios");
|
||||
|
||||
// Check if the installation was successful
|
||||
assert(
|
||||
output.includes("added") || output.includes("up to date"),
|
||||
"npm install did not complete successfully"
|
||||
);
|
||||
// // Check if the installation was successful
|
||||
// assert(
|
||||
// output.includes("added") || output.includes("up to date"),
|
||||
// "npm install did not complete successfully"
|
||||
// );
|
||||
|
||||
const proxyLog = await container.openShell("zsh");
|
||||
const { output: logOutput } = await proxyLog.runCommand(
|
||||
"cat /var/log/tinyproxy/tinyproxy.log"
|
||||
);
|
||||
// const proxyLog = await container.openShell("zsh");
|
||||
// const { output: logOutput } = await proxyLog.runCommand(
|
||||
// "cat /var/log/tinyproxy/tinyproxy.log"
|
||||
// );
|
||||
|
||||
// Check if the proxy log contains entries for the npm install
|
||||
assert(
|
||||
logOutput.includes("CONNECT registry.npmjs.org:443"),
|
||||
"Proxy log does not contain expected entries"
|
||||
);
|
||||
});
|
||||
// // Check if the proxy log contains entries for the npm install
|
||||
// assert(
|
||||
// logOutput.includes("CONNECT registry.npmjs.org:443"),
|
||||
// "Proxy log does not contain expected entries"
|
||||
// );
|
||||
// });
|
||||
|
||||
it(`safe-chain proxy allows to request through a local http registry`, async () => {
|
||||
container.dockerExec("npx -y verdaccio --listen 4873", true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue