MCPcopy Create free account
hub / github.com/goadesign/goa / validateRawResponse

Method validateRawResponse

jsonrpc/integration_tests/framework/executor.go:537–553  ·  view source on GitHub ↗
(t *testing.T, response any, expect Expect)

Source from the content-addressed store, hash-verified

535}
536
537func (e *executor) validateRawResponse(t *testing.T, response any, expect Expect) {
538 t.Helper()
539
540 // Raw responses might not be standard JSON-RPC
541 if expect.Error != nil {
542 // For raw requests, we might get non-standard errors
543 return
544 }
545
546 // Try to validate as JSON-RPC response
547 if respMap, ok := response.(map[string]any); ok {
548 e.validateJSONRPCResponse(t, respMap, expect)
549 } else {
550 // Just compare directly
551 assert.EqualValues(t, expect.Result, response, "Raw response mismatch")
552 }
553}
554
555func (e *executor) validateError(t *testing.T, _ error, _ *ExpectError) {
556 t.Helper()

Callers 1

executeRawMethod · 0.95

Calls 1

Tested by

no test coverage detected