Skip to content

Commit

Permalink
increase coverage
Browse files Browse the repository at this point in the history
Signed-off-by: jamal-khey <[email protected]>
  • Loading branch information
jamal-khey committed Nov 7, 2023
1 parent e01121c commit 4468359
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,18 @@ public void testDeleteAllModification() throws Exception {
assertEquals(0, modificationRepository.getModifications(TEST_GROUP_ID, false, true).size());
}

@Test
public void testDeleteTryToDeleteEmptyStashedModification() throws Exception {
List<ModificationInfos> modificationList = createSomeSwitchModifications(TEST_GROUP_ID, 3);

assertEquals(3, modificationRepository.getModifications(TEST_GROUP_ID, false, true).size());
mockMvc.perform(delete(URI_NETWORK_MODIF_BASE)
.queryParam("onlyStashed", "true")
.queryParam("groupUuid", TEST_GROUP_ID.toString()))
.andExpect(status().isBadRequest());
// assertEquals(3, modificationRepository.getModifications(TEST_GROUP_ID, false, true).size());
}

@Test
public void testNetworkModificationsWithErrorOnNetworkFlush() throws Exception {
String uriString = URI_NETWORK_MODIF_BASE + "?networkUuid=" + TEST_NETWORK_WITH_FLUSH_ERROR_ID + URI_NETWORK_MODIF_PARAMS;
Expand Down

0 comments on commit 4468359

Please sign in to comment.