MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / TestAPIDispatcher_Usage

Function TestAPIDispatcher_Usage

internal/nodeagent/dispatch_test.go:71–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestAPIDispatcher_Usage(t *testing.T) {
72 t.Parallel()
73 d := NewAPIDispatcher(newTestAPI(), nil)
74 body, err := d.Handle(context.Background(), "Usage", json.RawMessage(`{"reset":false}`))
75 if err != nil {
76 t.Fatalf("Usage err: %v", err)
77 }
78 if !json.Valid(body) {
79 t.Fatalf("invalid usage body: %s", body)
80 }
81}
82
83func TestAPIDispatcher_StartRestartRoundTrip(t *testing.T) {
84 t.Parallel()

Callers

nothing calls this directly

Calls 4

HandleMethod · 0.95
NewAPIDispatcherFunction · 0.85
newTestAPIFunction · 0.85
ValidMethod · 0.80

Tested by

no test coverage detected