fix(接口测试): 修复定时任务认证信息回显问题

--bug=1023819 --user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001023819
This commit is contained in:
guoyuqi 2023-02-24 19:13:52 +08:00 committed by fit2-zhao
parent 4da43fed2f
commit 27bf24ee67
1 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import io.metersphere.api.dto.automation.TcpTreeTableDataStruct;
import io.metersphere.api.dto.datacount.ApiDataCountResult;
import io.metersphere.api.dto.definition.*;
import io.metersphere.api.dto.definition.request.assertions.document.DocumentElement;
import io.metersphere.api.dto.definition.request.auth.MsAuthManager;
import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy;
import io.metersphere.api.dto.definition.request.sampler.MsJDBCSampler;
import io.metersphere.api.dto.definition.request.sampler.MsTCPSampler;
@ -1369,7 +1370,8 @@ public class ApiDefinitionService {
configObj.put(ARGUMENTS, request.getArguments());
// 设置 BaseAuth 参数
if (request.getAuthManager() != null && StringUtils.isNotBlank(request.getAuthManager().getUsername()) && StringUtils.isNotBlank(request.getAuthManager().getPassword())) {
configObj.put("authManager", request.getAuthManager());
MsAuthManager authManager = request.getAuthManager();
configObj.put("authManager", JSONUtil.parseObject(JSONUtil.toJSONString(authManager)));
}
return configObj.toString();
}