fix(e2e): forward gateway network client limits

This commit is contained in:
Vincent Koc
2026-06-19 02:26:29 +02:00
parent ba69d4fb03
commit d04cedb9fe
2 changed files with 56 additions and 0 deletions
+39
View File
@@ -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");