From 62988ce3cb3fa79a7a93f4c4f9ae0a3f56482235 Mon Sep 17 00:00:00 2001 From: Etienne Audet-Cobello Date: Tue, 10 Dec 2024 19:49:18 -0500 Subject: [PATCH] use constant header name --- src/k8s/pkg/k8sd/api/capi_access_handler_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {