Browse Source

add unit test of queryWorkAddressLest (#8054)

Co-authored-by: brian <flyunrain@163.com>
3.0.0/version-upgrade
XiaochenNan 3 years ago committed by GitHub
parent
commit
3456904af8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/WorkerGroupControllerTest.java

12
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();

Loading…
Cancel
Save