Skip to content

Commit

Permalink
fix: skip bypass on test
Browse files Browse the repository at this point in the history
  • Loading branch information
toopay committed Sep 27, 2024
1 parent a88e780 commit 899f04e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/db/postgrest_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ func PostgrestRequestBind(ctx raiden.Context, method string, url string, payload
req.Header.SetMethod(method)

if bypass {
req.Header.Set("apikey", getConfig().ServiceKey)
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", getConfig().ServiceKey))
if flag.Lookup("test.v") == nil {
req.Header.Set("apikey", getConfig().ServiceKey)
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", getConfig().ServiceKey))

Check warning on line 45 in pkg/db/postgrest_request.go

View check run for this annotation

Codecov / codecov/patch

pkg/db/postgrest_request.go#L44-L45

Added lines #L44 - L45 were not covered by tests
}
} else {
apikey := string(ctx.RequestContext().Request.Header.Peek("apikey"))
if apikey != "" {
Expand Down

0 comments on commit 899f04e

Please sign in to comment.