MCPcopy Index your code
hub / github.com/google/go-github / testNewRequestAndDoFailure

Function testNewRequestAndDoFailure

github/github_test.go:364–366  ·  view source on GitHub ↗

Test function under NewRequest failure and then s.client.Do failure. Method f should be a regular call that would normally succeed, but should return an error when NewRequest or s.client.Do fails.

(t *testing.T, methodName string, client *Client, f func() (*Response, error))

Source from the content-addressed store, hash-verified

362// Method f should be a regular call that would normally succeed, but
363// should return an error when NewRequest or s.client.Do fails.
364func testNewRequestAndDoFailure(t *testing.T, methodName string, client *Client, f func() (*Response, error)) {
365 testNewRequestAndDoFailureCategory(t, methodName, client, CoreCategory, f)
366}
367
368// testNewRequestAndDoFailureCategory works Like testNewRequestAndDoFailure, but allows setting the category.
369func testNewRequestAndDoFailureCategory(t *testing.T, methodName string, client *Client, category RateLimitCategory, f func() (*Response, error)) {

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…