Skip to content

Commit

Permalink
use constant header name
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed Dec 11, 2024
1 parent ae4639f commit 62988ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/k8s/pkg/k8sd/api/capi_access_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ func TestValidateCAPIAuthTokenAccessHandler(t *testing.T) {
req := &http.Request{
Header: make(http.Header),
}
req.Header.Set("Authorization", tc.tokenHeaderContent)
req.Header.Set(api.CAPITokenHeaderName, tc.tokenHeaderContent)

handler := api.ValidateCAPIAuthTokenAccessHandler("Authorization")
handler := api.ValidateCAPIAuthTokenAccessHandler(api.CAPITokenHeaderName)
valid, resp := handler(s, req)

if tc.expectErr {
Expand Down

0 comments on commit 62988ce

Please sign in to comment.