From c2265920eb28af28877751c753f6813be1b64733 Mon Sep 17 00:00:00 2001 From: Ben Duncan <5178243+benduncan@users.noreply.github.com> Date: Tue, 17 Feb 2026 22:15:49 +1000 Subject: [PATCH] fix: stop-dev.sh incorrectly detects single-node as multi-node in Docker E2E is_multinode() counted all [nodes.*] TOML subsections (daemon, nats, awsgw, etc.) instead of just top-level node entries. A single-node config has ~8 such sections, causing the single-node Docker E2E to use coordinated cluster shutdown and exit with code 254. Fix grep to match only [nodes.X] (not [nodes.X.Y]) and preserve the original test exit code in the cleanup trap. --- scripts/stop-dev.sh | 3 ++- tests/e2e/run-e2e.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/stop-dev.sh b/scripts/stop-dev.sh index 2531bd0eb..ea4cf4c63 100755 --- a/scripts/stop-dev.sh +++ b/scripts/stop-dev.sh @@ -56,7 +56,8 @@ has_service() { is_multinode() { local config_file="$CONFIG_DIR/hive.toml" if [ -f "$config_file" ]; then - local node_count=$(grep -c '^\[nodes\.' "$config_file") + # Count only top-level node sections [nodes.X], not subsections [nodes.X.Y] + local node_count=$(grep -cE '^\[nodes\.[^.]+\]' "$config_file") [ "$node_count" -gt 1 ] else return 1 diff --git a/tests/e2e/run-e2e.sh b/tests/e2e/run-e2e.sh index 6b7b12361..d02c043aa 100755 --- a/tests/e2e/run-e2e.sh +++ b/tests/e2e/run-e2e.sh @@ -35,6 +35,7 @@ cleanup() { fi fi ./scripts/stop-dev.sh + exit $EXIT_CODE } trap cleanup EXIT