SteNicholas commented on code in PR #155:
URL:
https://github.com/apache/incubator-paimon-webui/pull/155#discussion_r1464373442
##########
paimon-web-server/src/test/java/org/apache/paimon/web/server/controller/MetadataControllerTest.java:
##########
@@ -298,4 +298,28 @@ public void testGetSnapshotInfo() throws Exception {
R<Void> result = ObjectMapperUtils.fromJSON(response, new
TypeReference<R<Void>>() {});
assertEquals(200, result.getCode());
}
+
+ @Test
+ public void testGetOptionInfo() throws Exception {
+ MetadataDTO metadata = new MetadataDTO();
+ metadata.setCatalogId(catalogId);
+ metadata.setDatabaseName(databaseName);
+ metadata.setTableName(tableName);
+
+ String response =
+ mockMvc.perform(
+ MockMvcRequestBuilders.post(METADATA_PATH +
"/options")
+ .cookie(cookie)
+
.content(ObjectMapperUtils.toJSON(metadata))
+
.contentType(MediaType.APPLICATION_JSON_VALUE)
+
.accept(MediaType.APPLICATION_JSON_VALUE))
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andDo(MockMvcResultHandlers.print())
+ .andReturn()
+ .getResponse()
+ .getContentAsString();
+
+ R<Void> result = ObjectMapperUtils.fromJSON(response, new
TypeReference<R<Void>>() {});
+ assertEquals(200, result.getCode());
Review Comment:
Add the asertions for the data of result.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]