mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Cleanup registryProxy, increase timeout on DockerTestContainer
This commit is contained in:
parent
f4933b08d0
commit
2968960b41
2 changed files with 7 additions and 3 deletions
|
|
@ -16,7 +16,6 @@ const state = {
|
||||||
|
|
||||||
export function createSafeChainProxy() {
|
export function createSafeChainProxy() {
|
||||||
const server = createProxyServer();
|
const server = createProxyServer();
|
||||||
server.on("connect", handleConnect);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
startServer: () => startServer(server),
|
startServer: () => startServer(server),
|
||||||
|
|
@ -55,7 +54,12 @@ export function mergeSafeChainProxyEnvironmentVariables(env) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createProxyServer() {
|
function createProxyServer() {
|
||||||
const server = http.createServer(handleHttpProxyRequest);
|
const server = http.createServer(
|
||||||
|
handleHttpProxyRequest // This handles plain HTTP requests
|
||||||
|
);
|
||||||
|
|
||||||
|
// This handles HTTPS requests via the CONNECT method
|
||||||
|
server.on("connect", handleConnect);
|
||||||
|
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ export class DockerTestContainer {
|
||||||
console.log("Command timeout reached");
|
console.log("Command timeout reached");
|
||||||
resolve({ allData, output: parseShellOutput(allData), command });
|
resolve({ allData, output: parseShellOutput(allData), command });
|
||||||
ptyProcess.removeListener("data", handleInput);
|
ptyProcess.removeListener("data", handleInput);
|
||||||
}, 10000);
|
}, 20000);
|
||||||
|
|
||||||
function handleInput(data) {
|
function handleInput(data) {
|
||||||
allData.push(data);
|
allData.push(data);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue