Documentation
¶
Overview ¶
Package apitest serves an api.Client from gh fakes, as the plugin's tests write them, and records what it meters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Client ¶
func Client(t http.RoundTripper) *api.Client
Client builds a Client over t with a fixed token and no backoff sleeps.
func Metered ¶
func Metered(t http.RoundTripper, m *Meter) *api.Client
Metered is Client over t, metering into m.
Types ¶
type Meter ¶
type Meter struct {
// contains filtered or unexported fields
}
Meter records the samples a client meters, safe for concurrent use.
type RunnerTransport ¶
RunnerTransport answers POST /graphql by passing the query to R as `api graphql -f query=<q>` and every other request as `api <path>`. A runner error naming "HTTP <status>" answers that status with the runner's output; any other error answers 200 with the output when there is some, as gh prints a GraphQL response with errors, and fails the round trip when there is none.