Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(e2e): gate core health on startup marker

Steven Enamakeld11434b36c2a
diff --git a/scripts/__tests__/e2e-web-ports.test.mjs b/scripts/__tests__/e2e-web-ports.test.mjs
index cbb9a4657d..9f37e1b955 100644
--- a/scripts/__tests__/e2e-web-ports.test.mjs
+++ b/scripts/__tests__/e2e-web-ports.test.mjs
@@ -81,6 +81,13 @@ if [[ "$1" == *"/__admin/health" ]]; then
done
exit 1
fi
+if [[ "$1" == *"/health" ]]; then
+ for _ in {1..100}; do
+ [[ -f "$OPENHUMAN_WORKSPACE/core.started" ]] && exit 0
+ sleep 0.01
+ done
+ exit 1
+fi
`,
);
writeExecutable(
@@ -122,6 +129,7 @@ function stubCore(tree, boundPort, startupDelayMs = 0) {
bin,
`#!/usr/bin/env bash
sleep ${startupDelayMs / 1000}
+touch "$OPENHUMAN_WORKSPACE/core.started"
${boundPort == null ? "" : `echo "[core] OpenHuman core is ready \u2014 listening on http://127.0.0.1:${boundPort} (version test)"`}
sleep 30
`,