mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 12:26:38 -06:00
fix(e2e): forward gateway network client limits
This commit is contained in:
@@ -3387,6 +3387,45 @@ output="$(cat "$sampler_log")"
|
||||
);
|
||||
});
|
||||
|
||||
it.each([
|
||||
["connect", "OPENCLAW_GATEWAY_NETWORK_CLIENT_CONNECT_TIMEOUT_MS", "100ms"],
|
||||
["ready", "OPENCLAW_GATEWAY_NETWORK_CONNECT_READY_TIMEOUT_MS", "1e3"],
|
||||
])(
|
||||
"rejects invalid gateway network client %s timeout before Docker setup",
|
||||
(_label, envName, value) => {
|
||||
const result = spawnSync("bash", [GATEWAY_NETWORK_DOCKER_E2E_PATH], {
|
||||
encoding: "utf8",
|
||||
env: {
|
||||
...process.env,
|
||||
[envName]: value,
|
||||
OPENCLAW_SKIP_DOCKER_BUILD: "1",
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.status).toBe(2);
|
||||
expect(result.stderr).toContain(`invalid ${envName}: ${value}`);
|
||||
expect(result.stderr).not.toContain("Docker image not found");
|
||||
},
|
||||
);
|
||||
|
||||
it("forwards gateway network client timeout env into the Docker client", () => {
|
||||
const runner = readFileSync(GATEWAY_NETWORK_DOCKER_E2E_PATH, "utf8");
|
||||
|
||||
expect(runner).toContain(
|
||||
"docker_e2e_read_positive_int_env OPENCLAW_GATEWAY_NETWORK_CLIENT_CONNECT_TIMEOUT_MS 80000",
|
||||
);
|
||||
expect(runner).toContain(
|
||||
"docker_e2e_read_positive_int_env OPENCLAW_GATEWAY_NETWORK_CONNECT_READY_TIMEOUT_MS 80000",
|
||||
);
|
||||
expect(runner).toContain(
|
||||
'-e "OPENCLAW_GATEWAY_NETWORK_CLIENT_CONNECT_TIMEOUT_MS=$CLIENT_CONNECT_TIMEOUT_MS"',
|
||||
);
|
||||
expect(runner).toContain(
|
||||
'-e "OPENCLAW_GATEWAY_NETWORK_CONNECT_READY_TIMEOUT_MS=$CONNECT_READY_TIMEOUT_MS"',
|
||||
);
|
||||
expect(runner).toContain('"${CLIENT_LIMIT_ENV_ARGS[@]}"');
|
||||
});
|
||||
|
||||
it("requires TCP readiness for the gateway network runner", () => {
|
||||
const runner = readFileSync(GATEWAY_NETWORK_DOCKER_E2E_PATH, "utf8");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user