feat(接口测试): 接口管理模块接口定义接口文档模块不存在测试覆盖
This commit is contained in:
parent
21b8c1d4b6
commit
2cc4ee0281
|
@ -43,6 +43,7 @@ import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static io.metersphere.api.controller.result.ApiResultCode.API_DEFINITION_MODULE_NOT_EXIST;
|
||||||
import static io.metersphere.api.controller.result.ApiResultCode.API_DEFINITION_NOT_EXIST;
|
import static io.metersphere.api.controller.result.ApiResultCode.API_DEFINITION_NOT_EXIST;
|
||||||
import static io.metersphere.system.controller.handler.result.MsHttpResultCode.NOT_FOUND;
|
import static io.metersphere.system.controller.handler.result.MsHttpResultCode.NOT_FOUND;
|
||||||
|
|
||||||
|
@ -837,6 +838,18 @@ public class ApiDefinitionControllerTests extends BaseTest {
|
||||||
requestPostPermissionTest(PermissionConstants.PROJECT_API_DEFINITION_READ, DOC, request);
|
requestPostPermissionTest(PermissionConstants.PROJECT_API_DEFINITION_READ, DOC, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Order(11)
|
||||||
|
public void getDocModuleIsNull() throws Exception {
|
||||||
|
ApiDefinitionDocRequest request = new ApiDefinitionDocRequest();
|
||||||
|
// @@模块查看文档
|
||||||
|
request.setApiId(null);
|
||||||
|
request.setProjectId(DEFAULT_PROJECT_ID);
|
||||||
|
request.setType(ApiDefinitionDocType.MODULE.name());
|
||||||
|
request.setModuleIds(List.of("1001001"));
|
||||||
|
assertErrorCode(this.requestPost(DOC, request), API_DEFINITION_MODULE_NOT_EXIST);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(12)
|
@Order(12)
|
||||||
public void testDel() throws Exception {
|
public void testDel() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue