MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestUpdateAgentName

Function TestUpdateAgentName

internal/httpapi/agents_write_test.go:30–42  ·  view source on GitHub ↗

TestUpdateAgentName exercises the post-reshape agent PATCH: the only mutable field is the display name (screening config moved to /protection).

(t *testing.T)

Source from the content-addressed store, hash-verified

28// TestUpdateAgentName exercises the post-reshape agent PATCH: the only mutable
29// field is the display name (screening config moved to /protection).
30func TestUpdateAgentName(t *testing.T) {
31 srv := testServer(t)
32 code, body := sendJSON(t, "PATCH", srv.URL+"/v1/agents/support%40acme.com", "good", map[string]any{
33 "name": "Renamed Support",
34 })
35 if code != 200 {
36 t.Fatalf("status %d body %v", code, body)
37 }
38 // Returns the reloaded agent.
39 if body["email"] != "support@acme.com" {
40 t.Fatalf("expected reloaded agent, got %v", body)
41 }
42}
43
44func TestUpdateAgentNoFields(t *testing.T) {
45 srv := testServer(t)

Callers

nothing calls this directly

Calls 2

testServerFunction · 0.85
sendJSONFunction · 0.85

Tested by

no test coverage detected