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

Function TestAPIDispatcher_UnknownMethod

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

Source from the content-addressed store, hash-verified

100}
101
102func TestAPIDispatcher_UnknownMethod(t *testing.T) {
103 t.Parallel()
104 d := NewAPIDispatcher(newTestAPI(), nil)
105 _, err := d.Handle(context.Background(), "DoesNotExist", nil)
106 if err == nil || !strings.Contains(err.Error(), "unknown method") {
107 t.Fatalf("expected unknown method err, got %v", err)
108 }
109}
110
111func TestAPIDispatcher_StreamingRequiresSender(t *testing.T) {
112 t.Parallel()

Callers

nothing calls this directly

Calls 4

HandleMethod · 0.95
NewAPIDispatcherFunction · 0.85
newTestAPIFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected