(t *testing.T)
| 113 | } |
| 114 | |
| 115 | func TestAnonymousTokenResolver(t *testing.T) { |
| 116 | th := http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { |
| 117 | if r.Method != http.MethodGet { |
| 118 | rw.WriteHeader(http.StatusMethodNotAllowed) |
| 119 | return |
| 120 | } |
| 121 | rw.Header().Set("Content-Type", "application/json") |
| 122 | rw.WriteHeader(http.StatusOK) |
| 123 | rw.Write([]byte(`{"access_token":"perfectlyvalidopaquetoken"}`)) |
| 124 | }) |
| 125 | |
| 126 | runBasicTest(t, "testname", withTokenServer(th, nil)) |
| 127 | } |
| 128 | |
| 129 | func TestBasicAuthTokenResolver(t *testing.T) { |
| 130 | th := http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…