add unit test of queryWorkAddressLest (#8054)

Co-authored-by: brian <flyunrain@163.com>
This commit is contained in:
XiaochenNan 2022-01-17 13:36:46 +08:00 committed by GitHub
parent ee2801c21d
commit 3456904af8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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