From 3456904af8601556cecff5a07b260d092ca13bcb Mon Sep 17 00:00:00 2001 From: XiaochenNan <97658276+XiaochenNan@users.noreply.github.com> Date: Mon, 17 Jan 2022 13:36:46 +0800 Subject: [PATCH] add unit test of queryWorkAddressLest (#8054) Co-authored-by: brian --- .../api/controller/WorkerGroupControllerTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/WorkerGroupControllerTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/WorkerGroupControllerTest.java index 48de2319e6..0f639d3fa7 100644 --- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/WorkerGroupControllerTest.java +++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/WorkerGroupControllerTest.java @@ -114,6 +114,18 @@ public class WorkerGroupControllerTest extends AbstractControllerTest { logger.info(mvcResult.getResponse().getContentAsString()); } + @Test + public void queryWorkerAddressList() throws Exception { + MvcResult mvcResult = mockMvc.perform(get("/worker-groups/worker-address-list") + .header("sessionId", sessionId)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)) + .andReturn(); + Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class); + Assert.assertTrue(result != null && result.isSuccess()); + logger.info(mvcResult.getResponse().getContentAsString()); + } + @Test public void testDeleteById() throws Exception { WorkerGroup workerGroup = new WorkerGroup();