Skip to content

Commit 71b151c

Browse files
committed
fix(examples): use curl for port-forward readiness check (cross-platform)
1 parent fddea78 commit 71b151c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/tiny-smoke/run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ kubectl -n "${IMP_NS}" port-forward "pod/${AGENT_POD}" "${LOCAL_AGENT_PORT}:9091
6161
PF_PID=$!
6262

6363
for _ in $(seq 1 40); do
64-
if ss -lnt | awk '{print $4}' | grep -q ":${LOCAL_AGENT_PORT}$"; then
64+
if curl --max-time 1 -sS -o /dev/null "http://127.0.0.1:${LOCAL_AGENT_PORT}/"; then
6565
break
6666
fi
6767
sleep 0.5
6868
done
6969

70-
if ! ss -lnt | awk '{print $4}' | grep -q ":${LOCAL_AGENT_PORT}$"; then
70+
if ! curl --max-time 1 -sS -o /dev/null "http://127.0.0.1:${LOCAL_AGENT_PORT}/"; then
7171
echo "agent API port-forward did not become ready" >&2
7272
cat /tmp/imp-tiny-smoke-portforward.log >&2 || true
7373
exit 1
@@ -92,4 +92,4 @@ echo "${RESP}" | grep -q '"stream":"exit","code":0' || {
9292
exit 1
9393
}
9494

95-
echo "[6/6] smoke PASS: classRef boot + VM-to-VM HTTP connectivity validated"
95+
echo "[6/6] smoke PASS: classRef boot + VM-to-VM connectivity validated"

0 commit comments

Comments
 (0)