(t *testing.T)
| 3988 | } |
| 3989 | |
| 3990 | func TestSetCredentialsAsHeaders(t *testing.T) { |
| 3991 | t.Parallel() |
| 3992 | req := new(http.Request) |
| 3993 | id, secret := "id", "secret" |
| 3994 | modifiedRequest := setCredentialsAsHeaders(req, id, secret) |
| 3995 | |
| 3996 | actualID, actualSecret, ok := modifiedRequest.BasicAuth() |
| 3997 | if !ok { |
| 3998 | t.Error("request does not contain basic credentials") |
| 3999 | } |
| 4000 | |
| 4001 | if actualID != id { |
| 4002 | t.Errorf("id is %v, want %v", actualID, id) |
| 4003 | } |
| 4004 | |
| 4005 | if actualSecret != secret { |
| 4006 | t.Errorf("secret is %v, want %v", actualSecret, secret) |
| 4007 | } |
| 4008 | } |
| 4009 | |
| 4010 | func TestUnauthenticatedRateLimitedTransport(t *testing.T) { |
| 4011 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…