Corrected error duplicate container in docker compose

This commit is contained in:
Alexis Leboeuf
2026-01-07 10:01:24 +01:00
parent 56402455e6
commit 9f4f1a7b92
4 changed files with 46 additions and 18 deletions

View File

@@ -46,7 +46,6 @@ public class AthleteResource {
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = AthleteDTO.class)))
})
@PostMapping("/create")
@PreAuthorize("hasRole('Admin')") // Only admin can create??
public ResponseEntity<AthleteDTO> create(@RequestBody AthleteDTO dto) {

View File

@@ -0,0 +1,27 @@
package hackathon.FrisbYEE;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.test.web.servlet.client.RestTestClient;
import hackathon.FrisbYEE.rest.AthleteResource;
class FrisbYEEApplicationTests {
//Controller
private AthleteResource athleteResource;
private RestTestClient mockMvc;
@BeforeEach
void setUp() {
athleteResource = new AthleteResource();
mockMvc = RestTestClient.bindToController(athleteResource).build();
}
@Test
void testGetUsers() throws Exception {
//mockMvc.perform(get("/api/users"))
// .andExpect(status().isOk());
}
}