fix(接口测试): 修改接口导入的逻辑
--bug=1046233 --user=宋天阳 【接口测试】接口导入-MeterSphere格式-当前项目接口与模块均与被导入接口一致-覆盖模块导入-用例未更新 https://www.tapd.cn/55049933/s/1577374
This commit is contained in:
parent
f1c07a1872
commit
8a9808f541
|
@ -569,23 +569,21 @@ public class ApiDefinitionImportService {
|
|||
boolean isSameModule = StringUtils.equals(importApi.getModuleId(), existenceApi.getModuleId());
|
||||
/*
|
||||
开启模块覆盖并覆盖接口,此时有4种情况:
|
||||
接口请求一样,模块一样: 不处理
|
||||
*/
|
||||
if (isSameRequest && isSameModule) {
|
||||
//接口请求一样,模块一样: 不处理
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isSameRequest && isSameModule) {
|
||||
//接口请求不一样,模块一样:更新接口的非模块信息
|
||||
this.updateApiDefinitionRequest(importApi, existenceMsHTTPElement, request.getPlatform());
|
||||
apiDefinitionPreImportAnalysisResult.getUpdateApiData().add(importApi);
|
||||
} else if (isSameRequest) {
|
||||
//接口请求一样,模块不一样:只更新接口模块信息
|
||||
apiDefinitionPreImportAnalysisResult.getUpdateModuleApiList().add(importApi);
|
||||
} else {
|
||||
//接口请求不一样,模块不一样:更新接口所有信息
|
||||
this.updateApiDefinitionRequest(importApi, existenceMsHTTPElement, request.getPlatform());
|
||||
apiDefinitionPreImportAnalysisResult.getUpdateApiData().add(importApi);
|
||||
if (!isSameRequest || !isSameModule) {
|
||||
if (!isSameRequest && isSameModule) {
|
||||
//接口请求不一样,模块一样:更新接口的非模块信息
|
||||
this.updateApiDefinitionRequest(importApi, existenceMsHTTPElement, request.getPlatform());
|
||||
apiDefinitionPreImportAnalysisResult.getUpdateApiData().add(importApi);
|
||||
} else if (isSameRequest) {
|
||||
//接口请求一样,模块不一样:只更新接口模块信息
|
||||
apiDefinitionPreImportAnalysisResult.getUpdateModuleApiList().add(importApi);
|
||||
} else {
|
||||
//接口请求不一样,模块不一样:更新接口所有信息
|
||||
this.updateApiDefinitionRequest(importApi, existenceMsHTTPElement, request.getPlatform());
|
||||
apiDefinitionPreImportAnalysisResult.getUpdateApiData().add(importApi);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!isSameRequest) {
|
||||
|
|
Loading…
Reference in New Issue