feat(环境设置): 修复全局认证关不掉的问题

--bug=1008061 --user=宋天阳 【系统设置】项目环境,全局认证关不掉【+github#7811】
https://www.tapd.cn/55049933/s/1071776
This commit is contained in:
song-tianyang 2021-11-22 12:27:34 +08:00 committed by 刘瑞斌
parent d69940428f
commit c17637eb19

View File

@ -374,7 +374,9 @@ public class MsHTTPSamplerProxy extends MsTestElement {
try {
JSONObject authObject = environmentConfig.getAuthManager().getJSONObject("authManager");
if (authObject != null) {
this.authManager = authObject.toJavaObject(MsAuthManager.class);
if (authObject.containsKey("verification") && !StringUtils.equalsIgnoreCase(authObject.getString("verification"), "No Auth")) {
this.authManager = authObject.toJavaObject(MsAuthManager.class);
}
}
} catch (Exception e) {
}