File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,16 @@ def get_token(request):
27
27
"client_secret" : request .config .getoption ("--ad-secret" ),
28
28
"grant_type" : "client_credentials" ,
29
29
}
30
- ad_response = requests .post (f"https://login.microsoftonline.com/{ ad_tenant } /oauth2/token" , data = data )
30
+ ad_response = requests .get (
31
+ f"https://login.microsoftonline.com/{ ad_tenant } /oauth2/token" ,
32
+ data = data ,
33
+ timeout = 5 ,
34
+ headers = {"User-Agent" : "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Chrome/76.0.3809.100" },
35
+ )
31
36
32
37
if ad_response .status_code == 200 :
33
38
return ad_response .json ()["access_token" ]
34
- else :
35
- pytest .fail ("Unable to request Azure token endpoint" )
39
+ pytest .fail ("Unable to request Azure token endpoint" )
36
40
37
41
38
42
@pytest .mark .skip_for_nginx_oss
@@ -58,6 +62,8 @@ def get_token(request):
58
62
)
59
63
class TestJWTPoliciesVsJwksuri :
60
64
@pytest .mark .parametrize ("jwt_virtual_server" , [jwt_vs_spec_src , jwt_vs_route_src ])
65
+ @pytest .mark .flaky (max_runs = 3 )
66
+ @pytest .mark .skip (reason = "under review for causing pipeline delays" )
61
67
def test_jwt_policy_jwksuri (
62
68
self ,
63
69
request ,
You can’t perform that action at this time.
0 commit comments