node and account names
This commit is contained in:
@@ -52,6 +52,34 @@ def test_dashboard_chat_uses_streaming_fetch():
|
||||
assert 'console.error("chat stream failed", err)' in html
|
||||
|
||||
|
||||
def test_network_map_includes_node_friendly_name():
|
||||
tracker = TrackerServer()
|
||||
port = tracker.start()
|
||||
try:
|
||||
body = json.dumps({
|
||||
"endpoint": "http://127.0.0.1:9010",
|
||||
"model": "stub-model",
|
||||
"shard_start": 0,
|
||||
"shard_end": 3,
|
||||
"hardware_profile": {},
|
||||
"friendly_name": "Kitchen GPU",
|
||||
}).encode()
|
||||
req = urllib.request.Request(
|
||||
f"http://127.0.0.1:{port}/v1/nodes/register",
|
||||
data=body,
|
||||
headers={"Content-Type": "application/json"},
|
||||
method="POST",
|
||||
)
|
||||
urllib.request.urlopen(req).read()
|
||||
network = json.loads(
|
||||
urllib.request.urlopen(f"http://127.0.0.1:{port}/v1/network/map").read()
|
||||
)
|
||||
finally:
|
||||
tracker.stop()
|
||||
|
||||
assert network["nodes"][0]["friendly_name"] == "Kitchen GPU"
|
||||
|
||||
|
||||
def test_dashboard_chat_model_selector_shows_health_and_speed():
|
||||
tracker = TrackerServer()
|
||||
port = tracker.start()
|
||||
@@ -64,6 +92,9 @@ def test_dashboard_chat_model_selector_shows_health_and_speed():
|
||||
|
||||
assert "chatModelHealthHp" in html
|
||||
assert "modelServedCopiesFromMap" in html
|
||||
assert "nodeDisplayName" in html
|
||||
assert "accountDisplayName" in html
|
||||
assert "saveNickname" in html
|
||||
assert "chatModelTypicalTps" in html
|
||||
assert "chatModelOptionLabel" in html
|
||||
assert "findRoutingForModel" in html
|
||||
|
||||
Reference in New Issue
Block a user