diff --git a/src/k8s/pkg/k8sd/api/capi_access_handler_test.go b/src/k8s/pkg/k8sd/api/capi_access_handler_test.go index 2a4a5c0850..d40ac9cde3 100644 --- a/src/k8s/pkg/k8sd/api/capi_access_handler_test.go +++ b/src/k8s/pkg/k8sd/api/capi_access_handler_test.go @@ -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 {