Skip to content

Commit

Permalink
revert token header name consts
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed Dec 11, 2024
1 parent 62988ce commit cc3022a
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(api.CAPITokenHeaderName, tc.tokenHeaderContent)
req.Header.Set("capi-auth-token", tc.tokenHeaderContent)

Check failure on line 75 in src/k8s/pkg/k8sd/api/capi_access_handler_test.go

View workflow job for this annotation

GitHub Actions / Unit Tests & Code Quality

non-canonical header "capi-auth-token", instead use: "Capi-Auth-Token" (canonicalheader)

handler := api.ValidateCAPIAuthTokenAccessHandler(api.CAPITokenHeaderName)
handler := api.ValidateCAPIAuthTokenAccessHandler("capi-auth-token")
valid, resp := handler(s, req)

if tc.expectErr {
Expand Down

0 comments on commit cc3022a

Please sign in to comment.