mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
change test case in zeppelin rest api test
This commit is contained in:
parent
7bbfcd1c24
commit
cfcb6fdbe8
1 changed files with 6 additions and 6 deletions
|
|
@ -137,7 +137,7 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
|
|||
"]}";
|
||||
PostMethod post = httpPost("/notebook/", jsonRequest);
|
||||
LOG.info("testNoteCreate \n" + post.getResponseBodyAsString());
|
||||
assertThat("test note create method:", post, isCreated());
|
||||
assertThat("test note create method:", post, isAllowed());
|
||||
|
||||
Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {
|
||||
}.getType());
|
||||
|
|
@ -172,7 +172,7 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
|
|||
String jsonRequest = "{\"name\":\"" + noteName + "\"}";
|
||||
PostMethod post = httpPost("/notebook/", jsonRequest);
|
||||
LOG.info("testNoteCreate \n" + post.getResponseBodyAsString());
|
||||
assertThat("test note create method:", post, isCreated());
|
||||
assertThat("test note create method:", post, isAllowed());
|
||||
|
||||
Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {
|
||||
}.getType());
|
||||
|
|
@ -262,7 +262,7 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
|
|||
String oldJson = getNoteContent(sourceNoteId);
|
||||
// call note post
|
||||
PostMethod importPost = httpPost("/notebook/import/", oldJson);
|
||||
assertThat(importPost, isCreated());
|
||||
assertThat(importPost, isAllowed());
|
||||
resp =
|
||||
gson.fromJson(importPost.getResponseBodyAsString(),
|
||||
new TypeToken<Map<String, Object>>() {}.getType());
|
||||
|
|
@ -326,7 +326,7 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
|
|||
String jsonRequest = "{\"name\":\"" + noteName + "\"}";
|
||||
PostMethod post = httpPost("/notebook/" + sourceNoteId, jsonRequest);
|
||||
LOG.info("testNoteClone \n" + post.getResponseBodyAsString());
|
||||
assertThat("test note clone method:", post, isCreated());
|
||||
assertThat("test note clone method:", post, isAllowed());
|
||||
|
||||
Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {
|
||||
}.getType());
|
||||
|
|
@ -590,7 +590,7 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
|
|||
String jsonRequest = "{\"title\": \"title1\", \"text\": \"text1\"}";
|
||||
PostMethod post = httpPost("/notebook/" + note.getId() + "/paragraph", jsonRequest);
|
||||
LOG.info("testInsertParagraph response\n" + post.getResponseBodyAsString());
|
||||
assertThat("Test insert method:", post, isCreated());
|
||||
assertThat("Test insert method:", post, isAllowed());
|
||||
post.releaseConnection();
|
||||
|
||||
Map<String, Object> resp = gson.fromJson(post.getResponseBodyAsString(), new TypeToken<Map<String, Object>>() {
|
||||
|
|
@ -613,7 +613,7 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
|
|||
String jsonRequest2 = "{\"index\": 0, \"title\": \"title2\", \"text\": \"text2\"}";
|
||||
PostMethod post2 = httpPost("/notebook/" + note.getId() + "/paragraph", jsonRequest2);
|
||||
LOG.info("testInsertParagraph response2\n" + post2.getResponseBodyAsString());
|
||||
assertThat("Test insert method:", post2, isCreated());
|
||||
assertThat("Test insert method:", post2, isAllowed());
|
||||
post2.releaseConnection();
|
||||
|
||||
Paragraph paragraphAtIdx0 = note.getParagraphs().get(0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue