@@ -341,7 +341,10 @@ def start_test_proxy(request) -> None:
341341 """
342342
343343 repo_root = ascend_to_root (request .node .items [0 ].module .__file__ )
344- check_certificate_location (repo_root )
344+ requires_https = PROXY_URL .startswith ("https://" )
345+
346+ if requires_https :
347+ check_certificate_location (repo_root )
345348
346349 if not PROXY_MANUALLY_STARTED :
347350 if check_availability () == 200 :
@@ -367,13 +370,17 @@ def start_test_proxy(request) -> None:
367370 _LOGGER .info ("Downloading and starting standalone proxy executable..." )
368371 tool_name = prepare_local_tool (root )
369372
370- # Always start the proxy with these two defaults set to allow SSL connection
371- passenv = {
372- "ASPNETCORE_Kestrel__Certificates__Default__Path" : os .path .join (
373- root , "eng" , "common" , "testproxy" , "dotnet-devcert.pfx"
374- ),
375- "ASPNETCORE_Kestrel__Certificates__Default__Password" : "password" ,
376- }
373+ if requires_https :
374+ # Always start the proxy with these two defaults set to allow SSL connection
375+ passenv = {
376+ "ASPNETCORE_Kestrel__Certificates__Default__Path" : os .path .join (
377+ root , "eng" , "common" , "testproxy" , "dotnet-devcert.pfx"
378+ ),
379+ "ASPNETCORE_Kestrel__Certificates__Default__Password" : "password" ,
380+ }
381+ else :
382+ passenv = {}
383+
377384 # If they are already set, override what we give the proxy with what is in os.environ
378385 passenv .update (os .environ )
379386
0 commit comments