diff --git a/src/test/java/org/gridsuite/sensitivityanalysis/server/SupervisionControllerTest.java b/src/test/java/org/gridsuite/sensitivityanalysis/server/SupervisionControllerTest.java index cea88cf4..67cda1a3 100644 --- a/src/test/java/org/gridsuite/sensitivityanalysis/server/SupervisionControllerTest.java +++ b/src/test/java/org/gridsuite/sensitivityanalysis/server/SupervisionControllerTest.java @@ -6,6 +6,9 @@ */ package org.gridsuite.sensitivityanalysis.server; +import lombok.SneakyThrows; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -16,6 +19,7 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; +import static com.powsybl.network.store.model.NetworkStoreApi.VERSION; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -33,6 +37,13 @@ public class SupervisionControllerTest { @Autowired private MockMvc mockMvc; + @SneakyThrows + @Before + public void setup() { + mockMvc.perform(delete("/" + VERSION + "/results")) + .andExpect(status().isOk()); + } + @Test public void testResultCount() throws Exception { //get the result timeline uuid of the calculation