fix(接口测试): 接口导入环境配置信息
--bug=1011903 --user=郭雨琦 [接口测试]-github#12267-导出的接口定义中的case有环境配置信息,再导入到其他项目中之后执行时环境配置信息是原来旧的 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001011903
This commit is contained in:
parent
883b9cbef6
commit
e180194f9b
|
@ -147,6 +147,10 @@ public class MsDefinitionParser extends MsAbstractParser<ApiDefinitionImport> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cases.forEach(item -> {
|
cases.forEach(item -> {
|
||||||
|
String request = item.getRequest();
|
||||||
|
JSONObject requestObj = JSONObject.parseObject(request);
|
||||||
|
requestObj.put("useEnvironment", "");
|
||||||
|
item.setRequest(JSONObject.toJSONString(requestObj));
|
||||||
item.setApiDefinitionId(apiDefinition.getId());
|
item.setApiDefinitionId(apiDefinition.getId());
|
||||||
item.setProjectId(importRequest.getProjectId());
|
item.setProjectId(importRequest.getProjectId());
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue