MCPcopy Create free account
hub / github.com/asternic/wuzapi / TestStdioHealthRequest

Function TestStdioHealthRequest

stdio_test.go:15–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestStdioHealthRequest(t *testing.T) {
16 s := makeTestServer(t)
17
18 request := newRequest("test-001", "health", nil).toJSON(t)
19 response := executeRequest(t, s, request)
20
21 expected := map[string]interface{}{
22 "jsonrpc": "2.0",
23 "id": "test-001",
24 }
25
26 if diff := compareJSON(expected, response); diff != "" {
27 t.Errorf("Response mismatch:\n%s", diff)
28 }
29
30 // Verify it's a success response (has result, no error)
31 if response["result"] == nil {
32 t.Errorf("Expected result field, got nil")
33 }
34 if response["error"] != nil {
35 t.Errorf("Expected no error, got: %v", response["error"])
36 }
37}
38
39func TestAdminUsersAddAndList(t *testing.T) {
40 s := makeTestServer(t)

Callers

nothing calls this directly

Calls 5

makeTestServerFunction · 0.85
newRequestFunction · 0.85
executeRequestFunction · 0.85
compareJSONFunction · 0.85
toJSONMethod · 0.80

Tested by

no test coverage detected