(t *testing.T)
| 24 | } |
| 25 | |
| 26 | func TestNoopAuth(t *testing.T) { |
| 27 | p, err := NewAuthProvider(AuthConfig{}, nil) |
| 28 | if err != nil { |
| 29 | t.Fatal(err) |
| 30 | } |
| 31 | req := newTestRequest(t, "https://api.example.com/users") |
| 32 | if err := p.Apply(context.Background(), req, nil); err != nil { |
| 33 | t.Fatal(err) |
| 34 | } |
| 35 | if req.Header.Get("Authorization") != "" { |
| 36 | t.Error("noop auth set Authorization header") |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func TestBearerAuthStatic(t *testing.T) { |
| 41 | p, err := NewAuthProvider(AuthConfig{Scheme: "bearer", Token: "abc123"}, nil) |
nothing calls this directly
no test coverage detected