Documentation
¶
Overview ¶
Package fakegithub is an in-process GitHub for tests. It answers requests by substring match and records them, so tests can assert API call budgets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHub ¶
type GitHub struct {
// contains filtered or unexported fields
}
GitHub implements http.RoundTripper.
type Route ¶
type Route struct {
Match string
Status int
Body string
Headers map[string]string
// Times limits how often the route answers; zero means without limit.
Times int
}
Route answers requests whose description contains Match. The description is the GraphQL query for GraphQL calls, and "METHOD host/path" for everything else.