diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java index ebfdbb0d05..ede4a7502c 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java @@ -68,6 +68,13 @@ public class ProjectApplicationController { return projectApplicationService.get(request); } + @GetMapping("/ui/resource/pool/{organizationId}") + @Operation(summary = "应用设置-UI测试-获取资源池列表") + @RequiresPermissions(PermissionConstants.PROJECT_APPLICATION_UI_READ) + public List getUiResourcePoolList(@PathVariable String organizationId) { + return projectApplicationService.getResourcePoolList(StringUtils.defaultIfBlank(organizationId, SessionUtils.getCurrentOrganizationId())); + } + /** * ==========性能测试========== diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java index 6db1f7492d..667b784b6d 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java @@ -84,6 +84,8 @@ public class ProjectApplicationControllerTests extends BaseTest { public static final String UI_UPDATE_URL = "/project/application/update/ui"; //获取配置 public static final String GET_UI_URL = "/project/application/ui"; + //获取资源池 + public static final String GET_UI_RESOURCE_POOL_URL = "/project/application/ui/resource/pool"; //应用配置 - UI测试 - 清理报告配置 @Test @@ -123,6 +125,13 @@ public class ProjectApplicationControllerTests extends BaseTest { // @@异常参数校验 updatedGroupParamValidateTest(ProjectApplicationRequestDefinition.class, GET_UI_URL); } + + //应用管理 - UI测试 - 获取资源池 + @Test + @Order(6) + public void testGetUiResourcePool() throws Exception { + this.requestGetWithOkAndReturn(GET_UI_RESOURCE_POOL_URL + "/default_organization"); + } /** * ==========UI测试 end========== */