From 0a5aefefbdb4cdbcadd0e5721df64d6a6297d8e9 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 8 Apr 2026 06:57:35 +0100 Subject: [PATCH] test: harden Docker install e2e agent lane --- scripts/docker/install-sh-e2e/run.sh | 15 ++++++++------- scripts/test-install-sh-e2e-docker.sh | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/docker/install-sh-e2e/run.sh b/scripts/docker/install-sh-e2e/run.sh index 8148b51af21..f2d59db9135 100755 --- a/scripts/docker/install-sh-e2e/run.sh +++ b/scripts/docker/install-sh-e2e/run.sh @@ -451,6 +451,7 @@ run_profile() { local image_model if [[ "$agent_model_provider" == "openai" ]]; then agent_model="$(set_agent_model "$profile" \ + "openai/gpt-5.4" \ "openai/gpt-4.1-mini" \ "openai/gpt-4.1" \ "openai/gpt-4o-mini" \ @@ -483,7 +484,7 @@ run_profile() { PROOF_VALUE="$(node -e 'console.log(require("node:crypto").randomBytes(16).toString("hex"))')" echo -n "$PROOF_VALUE" >"$PROOF_TXT" write_png_lr_rg "$IMAGE_PNG" - EXPECTED_HOSTNAME="$(cat /etc/hostname | tr -d '\r\n')" + EXPECTED_HOSTNAME="$(hostname | tr -d '\r\n')" echo "==> Start gateway ($profile)" GATEWAY_LOG="$workspace/gateway.log" @@ -498,13 +499,13 @@ run_profile() { trap cleanup_profile EXIT echo "==> Wait for health ($profile)" - for _ in $(seq 1 60); do - if openclaw --profile "$profile" health --timeout 2000 --json >/dev/null 2>&1; then + for _ in $(seq 1 240); do + if openclaw --profile "$profile" health --timeout 5000 --json >/dev/null 2>&1; then break fi sleep 0.25 done - openclaw --profile "$profile" health --timeout 10000 --json >/dev/null + openclaw --profile "$profile" health --timeout 60000 --json >/dev/null echo "==> Agent turns ($profile)" TURN1_JSON="/tmp/agent-${profile}-1.json" @@ -550,14 +551,14 @@ run_profile() { fi run_agent_turn "$profile" "$SESSION_ID" \ - "Use the exec tool to run: cat /etc/hostname. Reply with the exact stdout only (trim trailing newline)." \ + "Use the exec tool to run this command: hostname. Reply with the exact stdout only (trim trailing newline)." \ "$TURN3_JSON" assert_agent_json_has_text "$TURN3_JSON" assert_agent_json_ok "$TURN3_JSON" "$agent_model_provider" local reply3 reply3="$(extract_matching_text "$TURN3_JSON" "$EXPECTED_HOSTNAME" | tr -d '\r\n')" if [[ "$reply3" != "$EXPECTED_HOSTNAME" ]]; then - echo "ERROR: agent did not read /etc/hostname correctly ($profile): $reply3" >&2 + echo "ERROR: agent did not run hostname correctly ($profile): $reply3" >&2 exit 1 fi local prompt3b @@ -566,7 +567,7 @@ run_profile() { assert_agent_json_has_text "$TURN3B_JSON" assert_agent_json_ok "$TURN3B_JSON" "$agent_model_provider" if [[ "$(cat "$HOSTNAME_TXT" 2>/dev/null | tr -d '\r\n' || true)" != "$EXPECTED_HOSTNAME" ]]; then - echo "ERROR: hostname.txt did not match /etc/hostname ($profile)" >&2 + echo "ERROR: hostname.txt did not match hostname output ($profile)" >&2 exit 1 fi diff --git a/scripts/test-install-sh-e2e-docker.sh b/scripts/test-install-sh-e2e-docker.sh index e98bb19d8d9..74dbe88d861 100755 --- a/scripts/test-install-sh-e2e-docker.sh +++ b/scripts/test-install-sh-e2e-docker.sh @@ -23,6 +23,7 @@ docker run --rm \ -e OPENCLAW_E2E_MODELS="$OPENCLAW_E2E_MODELS" \ -e OPENCLAW_INSTALL_E2E_PREVIOUS="${OPENCLAW_INSTALL_E2E_PREVIOUS:-}" \ -e OPENCLAW_INSTALL_E2E_SKIP_PREVIOUS="${OPENCLAW_INSTALL_E2E_SKIP_PREVIOUS:-0}" \ + -e OPENCLAW_NO_ONBOARD=1 \ -e OPENAI_API_KEY="$OPENAI_API_KEY" \ -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \ -e ANTHROPIC_API_TOKEN="$ANTHROPIC_API_TOKEN" \