@@ -284,7 +284,7 @@ class FakeConfig:
284
284
def __init__ (self , token = None , ** kwargs ):
285
285
self .api_key = {}
286
286
if token :
287
- self .api_key ['authorization ' ] = token
287
+ self .api_key ['BearerToken ' ] = token
288
288
289
289
self .__dict__ .update (kwargs )
290
290
@@ -735,7 +735,7 @@ async def test_user_exec_auth(self, mock):
735
735
"token" : token
736
736
}
737
737
expected = FakeConfig (host = TEST_HOST , api_key = {
738
- "authorization " : BEARER_TOKEN_FORMAT % token })
738
+ "BearerToken " : BEARER_TOKEN_FORMAT % token })
739
739
actual = FakeConfig ()
740
740
await KubeConfigLoader (
741
741
config_dict = self .TEST_KUBE_CONFIG ,
@@ -904,14 +904,14 @@ async def test_new_client_from_config(self):
904
904
config_file = config_file , context = "simple_token" )
905
905
self .assertEqual (TEST_HOST , client .configuration .host )
906
906
self .assertEqual (BEARER_TOKEN_FORMAT % TEST_DATA_BASE64 ,
907
- client .configuration .api_key ['authorization ' ])
907
+ client .configuration .api_key ['BearerToken ' ])
908
908
909
909
async def test_new_client_from_config_dict (self ):
910
910
client = await new_client_from_config_dict (
911
911
config_dict = self .TEST_KUBE_CONFIG , context = "simple_token" )
912
912
self .assertEqual (TEST_HOST , client .configuration .host )
913
913
self .assertEqual (BEARER_TOKEN_FORMAT % TEST_DATA_BASE64 ,
914
- client .configuration .api_key ['authorization ' ])
914
+ client .configuration .api_key ['BearerToken ' ])
915
915
916
916
async def test_no_users_section (self ):
917
917
expected = FakeConfig (host = TEST_HOST )
@@ -1091,7 +1091,7 @@ async def test_new_client_from_config(self):
1091
1091
config_file = kubeconfigs , context = "simple_token" )
1092
1092
self .assertEqual (TEST_HOST , client .configuration .host )
1093
1093
self .assertEqual (BEARER_TOKEN_FORMAT % TEST_DATA_BASE64 ,
1094
- client .configuration .api_key ['authorization ' ])
1094
+ client .configuration .api_key ['BearerToken ' ])
1095
1095
1096
1096
def test_save_changes (self ):
1097
1097
kubeconfigs = self ._create_multi_config ()
0 commit comments