fix(e2e): require gateway network TCP readiness

This commit is contained in:
Vincent Koc
2026-06-06 16:45:21 +02:00
parent da98896f0c
commit 779fb9efe3
2 changed files with 8 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ docker_e2e_docker_cmd run -d \
bash -lc "set -euo pipefail; source scripts/lib/openclaw-e2e-instance.sh; entry=\"\$(openclaw_e2e_resolve_entrypoint)\"; node \"\$entry\" config set gateway.controlUi.enabled false >/dev/null; openclaw_e2e_exec_gateway \"\$entry\" $PORT lan /tmp/gateway-net-e2e.log" >/dev/null
echo "Waiting for gateway to come up..."
if ! docker_e2e_wait_container_bash "$GW_NAME" 180 0.5 "source scripts/lib/openclaw-e2e-instance.sh; openclaw_e2e_probe_tcp 127.0.0.1 $PORT || grep -q \"listening on ws://\" /tmp/gateway-net-e2e.log 2>/dev/null"; then
if ! docker_e2e_wait_container_bash "$GW_NAME" 180 0.5 "source scripts/lib/openclaw-e2e-instance.sh; openclaw_e2e_probe_tcp 127.0.0.1 $PORT"; then
echo "Gateway failed to start"
docker_e2e_tail_container_file_if_running "$GW_NAME" /tmp/gateway-net-e2e.log 120
exit 1

View File

@@ -1975,6 +1975,13 @@ output="$(run_logged_print_heartbeat plugins-run 08 bash -c 'printf "captured co
);
});
it("requires TCP readiness for the gateway network runner", () => {
const runner = readFileSync(GATEWAY_NETWORK_DOCKER_E2E_PATH, "utf8");
expect(runner).toContain("openclaw_e2e_probe_tcp 127.0.0.1 $PORT");
expect(runner).not.toMatch(/openclaw_e2e_probe_tcp[^\n]*\|\|[^\n]*gateway-net-e2e\.log/u);
});
it("copies root lifecycle scripts before cleanup-smoke installs dependencies", () => {
const dockerfile = readFileSync(CLEANUP_SMOKE_DOCKERFILE_PATH, "utf8");
const installIndex = dockerfile.indexOf("pnpm install --frozen-lockfile");