@@ -134,13 +134,14 @@ def test_env_file(mock_config_dir):
134134
135135
136136@pytest .mark .parametrize (
137- "uri,project_id,issuer,error" ,
137+ "uri,project_id,issuer,error,iss_override " ,
138138 [
139139 pytest .param (
140140 uri ,
141141 project_id ,
142142 iss ,
143143 project_id is None ,
144+ iss_override ,
144145 id = f"{ label } with { plabel } " ,
145146 )
146147 for uri , iss , label in (
@@ -158,10 +159,23 @@ def test_env_file(mock_config_dir):
158159 ("DREMIO_DYNAMIC" , "dynamic-project-id" ),
159160 (str (uuid .uuid4 ()), "project-id" ),
160161 )
162+ for iss_override in (None , "https://my-override" )
161163 ],
162164)
163- def test_auth_urls (uri : str , project_id : str | None , issuer : str , error : bool ):
164- d = settings .Dremio .model_validate ({"uri" : uri , "project_id" : project_id })
165+ def test_auth_urls (
166+ uri : str , project_id : str | None , issuer : str , error : bool , iss_override : str | None
167+ ):
168+ d = settings .Dremio .model_validate (
169+ {
170+ "uri" : uri ,
171+ "project_id" : project_id ,
172+ "auth_issuer_uri_override" : (
173+ iss_override if iss_override and not error else None
174+ ),
175+ }
176+ )
177+ if iss_override :
178+ issuer = iss_override
165179 auth = (f"{ issuer } /oauth/authorize" , f"{ issuer } /oauth/token" ) if not error else None
166180 issuer = issuer if not error else None
167181 assert d .auth_issuer_uri == issuer
0 commit comments