A route may have its own listener: every request there is that route, paths unprefixed
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
+12
-1
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Smoke run (v2): everything v1 checked, plus the context guard, wake-on-LAN and identity gating.
|
||||
# Smoke run (v2.3): everything v1 checked, plus the context guard, wake-on-LAN, identity gating and
|
||||
# a route's dedicated listener.
|
||||
# Prints "smoke: ok" or fails with the crossbar log.
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
@@ -57,4 +58,14 @@ sleep 1
|
||||
curl -s "$base/_crossbar/usage?by=host" | grep -q '"cached_tokens":[1-9]' || fail "usage has no cached tokens"
|
||||
curl -s "$base/_crossbar/metrics" | grep -q 'crossbar_requests_total{route="hermes-x",host="beta",status="403"}' && fail "403s are refused before a lease and must not be counted as requests"
|
||||
curl -s "$base/_crossbar/metrics" | grep -q 'crossbar_host_healthy{host="beta"} 1' || fail "metrics missing beta health"
|
||||
# 6. v2.3: boxmaker-a has its own listener. Paths are unprefixed, the chat and a control call land
|
||||
# on the same host (affinity = "route"), and the admin API is not served there.
|
||||
lb=http://127.0.0.1:17801
|
||||
h1=$(hdrs -X POST -H 'Content-Type: application/json' -d "$(conv C)" "$lb/v1/chat/completions")
|
||||
h2=$(hdrs "$lb/props?model=ornith-1.5-35b-a3b")
|
||||
case "$h1" in 200*) ;; *) fail "chat on the dedicated listener should be 200, got '$h1'";; esac
|
||||
[ "$(echo "$h1" | cut -d' ' -f2)" = "$(echo "$h2" | cut -d' ' -f2)" ] || fail "chat went to '$h1', /props to '$h2': one route, one host"
|
||||
h=$(curl -s -o /dev/null -w '%{http_code}' "$lb/_crossbar/hosts"); [ "$h" = "404" ] || fail "admin must not be served on a dedicated listener, got $h"
|
||||
h=$(curl -s -o /dev/null -w '%{http_code}' "$lb/boxmaker-a/v1/models"); [ "$h" = "404" ] || fail "a prefixed path on the dedicated listener should be 404, got $h"
|
||||
|
||||
echo "smoke: ok (stream spread $((lastms - firstms)) ms)"
|
||||
|
||||
Reference in New Issue
Block a user