Skip to content

Commit

Permalink
fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
s7monk committed Jan 15, 2024
1 parent 4ff8e68 commit 33eca29
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,13 @@ public void setup() throws Exception {

@AfterEach
public void after() throws Exception {
DatabaseDTO dropDatabase = new DatabaseDTO();
dropDatabase.setCatalogName(catalogName);
dropDatabase.setCatalogId(catalogId);
dropDatabase.setName(databaseName);
dropDatabase.setIgnoreIfExists(true);
dropDatabase.setCascade(true);
CatalogDTO removeCatalog = new CatalogDTO();
removeCatalog.setId(catalogId);
removeCatalog.setName(catalogName);
mockMvc.perform(
MockMvcRequestBuilders.post(databasePath + "/drop")
MockMvcRequestBuilders.post(catalogPath + "/remove")
.cookie(cookie)
.content(ObjectMapperUtils.toJSON(dropDatabase))
.content(ObjectMapperUtils.toJSON(removeCatalog))
.contentType(MediaType.APPLICATION_JSON_VALUE)
.accept(MediaType.APPLICATION_JSON_VALUE))
.andExpect(MockMvcResultMatchers.status().isOk());
Expand Down

0 comments on commit 33eca29

Please sign in to comment.