fix(接口测试): metersphere 文件导入错误
This commit is contained in:
parent
45f791a4b1
commit
768ed785a9
|
@ -22,7 +22,6 @@ import lombok.Data;
|
||||||
@JSONType(seeAlso = {HttpRequest.class, DubboRequest.class, SqlRequest.class, TCPRequest.class}, typeKey = "type")
|
@JSONType(seeAlso = {HttpRequest.class, DubboRequest.class, SqlRequest.class, TCPRequest.class}, typeKey = "type")
|
||||||
@Data
|
@Data
|
||||||
public abstract class Request {
|
public abstract class Request {
|
||||||
private String type;
|
|
||||||
@JSONField(ordinal = 1)
|
@JSONField(ordinal = 1)
|
||||||
private String id;
|
private String id;
|
||||||
@JSONField(ordinal = 2)
|
@JSONField(ordinal = 2)
|
||||||
|
|
|
@ -337,7 +337,9 @@ public class ApiDefinitionService {
|
||||||
List<ApiDefinitionResult> data = apiImport.getData();
|
List<ApiDefinitionResult> data = apiImport.getData();
|
||||||
HashMap<String, List<ApiDefinitionResult>> resultMap = apiImport.getResultMap();
|
HashMap<String, List<ApiDefinitionResult>> resultMap = apiImport.getResultMap();
|
||||||
resultMap.forEach((module, apiDefinition) -> {
|
resultMap.forEach((module, apiDefinition) -> {
|
||||||
|
// apiModuleService
|
||||||
// apiModuleService.addNode();
|
// apiModuleService.addNode();
|
||||||
|
|
||||||
});
|
});
|
||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
ApiDefinitionResult item = data.get(i);
|
ApiDefinitionResult item = data.get(i);
|
||||||
|
|
|
@ -105,6 +105,17 @@ public class ApiModuleService {
|
||||||
return node.getId();
|
return node.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ApiModule getNewModule(String name, String projectId, int level) {
|
||||||
|
ApiModule node = new ApiModule();
|
||||||
|
node.setCreateTime(System.currentTimeMillis());
|
||||||
|
node.setUpdateTime(System.currentTimeMillis());
|
||||||
|
node.setId(UUID.randomUUID().toString());
|
||||||
|
node.setLevel(level);
|
||||||
|
node.setName(name);
|
||||||
|
node.setProjectId(projectId);
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
private void validateNode(ApiModule node) {
|
private void validateNode(ApiModule node) {
|
||||||
if (node.getLevel() > TestCaseConstants.MAX_NODE_DEPTH) {
|
if (node.getLevel() > TestCaseConstants.MAX_NODE_DEPTH) {
|
||||||
throw new RuntimeException(Translator.get("test_case_node_level_tip")
|
throw new RuntimeException(Translator.get("test_case_node_level_tip")
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8a972a198775b3783ed6e4cef27197e53d1ebdc8
|
Subproject commit a22a3005d9bd254793fcf634d72539cbdf31be3a
|
Loading…
Reference in New Issue