mustParseURL is a helper function that parses a URL and fails the test if there is an error.
(t *testing.T, rawurl string)
| 57 | |
| 58 | // mustParseURL is a helper function that parses a URL and fails the test if there is an error. |
| 59 | func mustParseURL(t *testing.T, rawurl string) *url.URL { |
| 60 | t.Helper() |
| 61 | u, err := url.Parse(rawurl) |
| 62 | if err != nil { |
| 63 | t.Fatalf("Failed to parse URL %q: %v", rawurl, err) |
| 64 | } |
| 65 | return u |
| 66 | } |
| 67 | |
| 68 | // setup sets up a test HTTP server along with a github.Client that is |
| 69 | // configured to talk to that test server. Tests should register handlers on |
no outgoing calls
no test coverage detected
searching dependent graphs…