Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
shzcore committed Jun 11, 2020
1 parent 2a38b12 commit 648cefb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/com/baidu/hugegraph/unit/rest/RestClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,17 @@ public void testPostWithAllParams() {
Assert.assertEquals(200, restResult.status());
}

@Test
public void testPostHttpsWithAllParams() {
String trustStoreFile = "src/test/resources/cacerts.jks";
String trustStorePassword = "changeit";
RestClient client = new RestClientImpl("/test", "user", "", 1000,
10, 5, "https", trustStoreFile,
trustStorePassword, 200);
RestResult restResult = client.post("path", "body");
Assert.assertEquals(200, restResult.status());
}

@Test
public void testPostWithHeaderAndContent() {
MultivaluedMap<String, Object> headers = new MultivaluedHashMap<>();
Expand Down
Binary file added src/test/resources/cacerts.jks
Binary file not shown.

0 comments on commit 648cefb

Please sign in to comment.