Skip to content

Commit

Permalink
vipshop#684 unnecessary to fix, because unnecessary to check, users c…
Browse files Browse the repository at this point in the history
…an use domain name
  • Loading branch information
cmzdandan committed Mar 18, 2020
1 parent 01e18c6 commit 9ce78ba
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class RegistryCenterControllerTest extends AbstractSaturnConsoleTest {
public void testCreateAndUpdateZkClusterInfo() throws Exception {
String clusterName = "/clusterx";
// craete a new zkCluster
ZkClusterInfoForTest zkClusterInfo = new ZkClusterInfoForTest(clusterName, "alias1", "127.0.0.1:54321", "A机房");
ZkClusterInfoForTest zkClusterInfo = new ZkClusterInfoForTest(clusterName, "alias1", "127.0.0.1:12345", "A机房");
MvcResult result = mvc.perform(post("/console/zkClusters").contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(zkClusterInfo.toContent())).andExpect(status().isOk()).andReturn();
String responseBody = result.getResponse().getContentAsString();
Expand Down Expand Up @@ -67,7 +67,7 @@ public void testCreateAndUpdateZkClusterInfo() throws Exception {
}
}

assertEquals("127.0.0.1:54321", connectionString);
assertEquals("127.0.0.1:12345", connectionString);
assertEquals("A机房", description);

// get 单个zkcluster
Expand All @@ -77,7 +77,7 @@ public void testCreateAndUpdateZkClusterInfo() throws Exception {
resultMap = JSONObject.parseObject(responseBody, Map.class);
Map<String, Object> zkClusterMap = (Map<String, Object>) resultMap.get("obj");
assertEquals(clusterName, zkClusterMap.get("zkClusterKey"));
assertEquals("127.0.0.1:54321", zkClusterMap.get("zkAddr"));
assertEquals("127.0.0.1:12345", zkClusterMap.get("zkAddr"));
assertEquals("A机房", zkClusterMap.get("description"));
assertTrue((Boolean) zkClusterMap.get("offline"));
}
Expand Down

0 comments on commit 9ce78ba

Please sign in to comment.