@@ -231,6 +231,14 @@ def get_registry_mocked(execution_env :str) -> RegistryCfg:
231231
232232_AUTH_CFG_DEFECTIVE = copy .deepcopy (_AUTH_CFG )
233233_AUTH_CFG_DEFECTIVE ["google" ]["credentialsfilepath" ] = _NON_EXISTENT_AUTH_GOOGLE_SA_KEY_PATH
234+ _AUTH_CFG_DEFECTIVE ["stackql_oauth2_testing" ] = {
235+ "type" : "oauth2" ,
236+ "grant_type" : "client_credentials" ,
237+ "client_id" : "dummy_client_id" ,
238+ "client_secret" : "dummy_client_secret" ,
239+ "token_url" : "http://localhost:2091/contrived/simple/error/token" ,
240+ "scopes" : ["scope1" , "scope2" ]
241+ }
234242
235243_AUTH_PLUS_EXTERNAL_POSTGRES = copy .deepcopy (_AUTH_CFG )
236244
@@ -286,6 +294,14 @@ def get_registry_mocked(execution_env :str) -> RegistryCfg:
286294
287295_AUTH_CFG_DEFECTIVE_DOCKER = copy .deepcopy (_AUTH_CFG_DOCKER )
288296_AUTH_CFG_DEFECTIVE_DOCKER ["google" ]["credentialsfilepath" ] = _NON_EXISTENT_AUTH_GOOGLE_SA_KEY_PATH_DOCKER
297+ _AUTH_CFG_DEFECTIVE_DOCKER ["stackql_oauth2_testing" ] = {
298+ "type" : "oauth2" ,
299+ "grant_type" : "client_credentials" ,
300+ "client_id" : "dummy_client_id" ,
301+ "client_secret" : "dummy_client_secret" ,
302+ "token_url" : "http://host.docker.internal:2091/contrived/simple/error/token" ,
303+ "scopes" : ["scope1" , "scope2" ]
304+ }
289305
290306_AUTH_PLUS_EXTERNAL_POSTGRES_DOCKER = copy .deepcopy (_AUTH_CFG_DOCKER )
291307
@@ -1103,6 +1119,7 @@ def get_variables(execution_env :str, sql_backend_str :str, use_stackql_preinsta
11031119 if execution_env == 'docker' :
11041120 rv ['AUTH_CFG_STR' ] = AUTH_CFG_STR_DOCKER
11051121 rv ['AUTH_CFG_DEFECTIVE_STR' ] = AUTH_CFG_DEFECTIVE_STR_DOCKER
1122+ rv ['LOCAL_HOST_ALIAS' ] = 'host.docker.internal'
11061123 rv ['AUTH_GOOGLE_SA_KEY_PATH' ] = _AUTH_GOOGLE_SA_KEY_PATH_DOCKER
11071124 rv ['NON_EXISTENT_AUTH_GOOGLE_SA_KEY_PATH' ] = _NON_EXISTENT_AUTH_GOOGLE_SA_KEY_PATH_DOCKER
11081125 rv ['AUTH_PLUS_EXTERNAL_POSTGRES' ] = AUTH_PLUS_EXTERNAL_POSTGRES_DOCKER
@@ -1144,6 +1161,7 @@ def get_variables(execution_env :str, sql_backend_str :str, use_stackql_preinsta
11441161 else :
11451162 rv ['AUTH_CFG_STR' ] = AUTH_CFG_STR
11461163 rv ['AUTH_CFG_DEFECTIVE_STR' ] = AUTH_CFG_DEFECTIVE_STR
1164+ rv ['LOCAL_HOST_ALIAS' ] = 'localhost'
11471165 rv ['AUTH_GOOGLE_SA_KEY_PATH' ] = _AUTH_GOOGLE_SA_KEY_PATH
11481166 rv ['NON_EXISTENT_AUTH_GOOGLE_SA_KEY_PATH' ] = _NON_EXISTENT_AUTH_GOOGLE_SA_KEY_PATH
11491167 rv ['AUTH_PLUS_EXTERNAL_POSTGRES' ] = AUTH_PLUS_EXTERNAL_POSTGRES
0 commit comments