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

Function TestSetCredentialsAsHeaders

github/github_test.go:3990–4008  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3988}
3989
3990func 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
4010func TestUnauthenticatedRateLimitedTransport(t *testing.T) {
4011 t.Parallel()

Callers

nothing calls this directly

Calls 2

setCredentialsAsHeadersFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…