Skip to content

Commit

Permalink
Merge pull request alibaba#201 from yanlinly/master
Browse files Browse the repository at this point in the history
  • Loading branch information
yanlinly authored Oct 31, 2018
2 parents 6e3f2ba + 224aecf commit 6cddbc6
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ public void setUp() throws Exception {

@After
public void cleanup() throws Exception {
HttpResult result = null;
try {
List<String> params = Arrays.asList("dataId", dataId, "group", group, "beta", "true");
result = agent.httpDelete(CONFIG_CONTROLLER_PATH + "/", null, params, agent.getEncode(), TIME_OUT);
Assert.assertEquals(HttpURLConnection.HTTP_OK, result.code);
Assert.assertEquals(true, JSON.parseObject(result.content).getBoolean("data"));
} catch (Exception e) {
Assert.assertTrue(false);
}
}

/**
Expand Down Expand Up @@ -609,11 +618,13 @@ public void nacos_openAPI_queryBeta_1() {
Assert.assertEquals(HttpURLConnection.HTTP_OK, result.code);
Assert.assertEquals("true", result.content);


List<String> params = Arrays.asList("dataId", dataId, "group", group, "beta", "true");
result = agent.httpGet(CONFIG_CONTROLLER_PATH + "/", null, params, agent.getEncode(), TIME_OUT);
Assert.assertEquals(HttpURLConnection.HTTP_OK, result.code);
Assert.assertEquals(content, JSON.parseObject(result.content).getJSONObject("data").getString("content"));
// delete data
result = agent.httpDelete(CONFIG_CONTROLLER_PATH + "/", null, params, agent.getEncode(), TIME_OUT);
Assert.assertEquals(HttpURLConnection.HTTP_OK, result.code);
} catch (Exception e) {
Assert.assertTrue(false);
}
Expand Down

0 comments on commit 6cddbc6

Please sign in to comment.