MCPcopy Create free account
hub / github.com/cli/cli / checkRequest

Method checkRequest

script/ghmock/checker.go:151–153  ·  view source on GitHub ↗

checkRequest checks a request gh made and the response ghmock gave. resp is nil when no response was stored. Off-schema responses aren't checked, but gh's query still is.

(e loggedRequest, resp *response)

Source from the content-addressed store, hash-verified

149// nil when no response was stored. Off-schema responses aren't checked, but
150// gh's query still is.
151func (c *checker) checkRequest(e loggedRequest, resp *response) checkResult {
152 return c.check(e, resp, true)
153}
154
155// Response-only saves reconstruct query text, not the original variable payload.
156func (c *checker) checkResponse(e loggedRequest, resp *response) checkResult {

Callers 3

checkMethod · 0.80
TestCheckRequestFunction · 0.80
scaffoldGraphQLFunction · 0.80

Calls 1

checkMethod · 0.95

Tested by 1

TestCheckRequestFunction · 0.64