From 9f4f1a7b92bcf95f6e41e6ddbf9f5a374c7562f4 Mon Sep 17 00:00:00 2001 From: Alexis Leboeuf Date: Wed, 7 Jan 2026 10:01:24 +0100 Subject: [PATCH] Corrected error duplicate container in docker compose --- .../FrisbYEE/rest/AthleteResource.java | 1 - .../FrisbYEE/FrisbYeeApplicationTests.java | 27 +++++++++++++++++++ backend.log | 19 +++++++++++++ docker-compose.yml | 17 ------------ 4 files changed, 46 insertions(+), 18 deletions(-) create mode 100644 back_end/src/test/java/hackathon/FrisbYEE/FrisbYeeApplicationTests.java create mode 100644 backend.log diff --git a/back_end/src/main/java/hackathon/FrisbYEE/rest/AthleteResource.java b/back_end/src/main/java/hackathon/FrisbYEE/rest/AthleteResource.java index 8aa8c08..84dc66e 100644 --- a/back_end/src/main/java/hackathon/FrisbYEE/rest/AthleteResource.java +++ b/back_end/src/main/java/hackathon/FrisbYEE/rest/AthleteResource.java @@ -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 create(@RequestBody AthleteDTO dto) { diff --git a/back_end/src/test/java/hackathon/FrisbYEE/FrisbYeeApplicationTests.java b/back_end/src/test/java/hackathon/FrisbYEE/FrisbYeeApplicationTests.java new file mode 100644 index 0000000..38165dc --- /dev/null +++ b/back_end/src/test/java/hackathon/FrisbYEE/FrisbYeeApplicationTests.java @@ -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()); + } +} diff --git a/backend.log b/backend.log new file mode 100644 index 0000000..92f49c0 --- /dev/null +++ b/backend.log @@ -0,0 +1,19 @@ +nohup: ignoring input +[INFO] Scanning for projects... +Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml +Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml +Progress (1): 3.4 kB Progress (1): 7.3 kB Progress (2): 7.3 kB | 4.6 kB Progress (2): 13 kB | 4.6 kB Progress (2): 13 kB | 9.9 kB Progress (2): 19 kB | 9.9 kB Progress (2): 20 kB | 9.9 kB Progress (2): 20 kB | 14 kB Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 kB at 8.9 kB/s) +Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 kB at 6.3 kB/s) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD FAILURE +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 5.475 s +[INFO] Finished at: 2026-01-07T09:56:46+01:00 +[INFO] ------------------------------------------------------------------------ +[ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/alexis/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException diff --git a/docker-compose.yml b/docker-compose.yml index aa785fe..4e87104 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,20 +43,3 @@ volumes: postgres_data: version: "3.9" - postgres: - image: postgres:16 - container_name: frisbyee-postgres - ports: - - "5432:5432" - environment: - POSTGRES_DB: frisbyee - POSTGRES_USER: frisbyee_user - POSTGRES_PASSWORD: secret - volumes: - - postgres_data:/var/lib/postgresql/data - -volumes: - postgres_data: - -version: "3.9" -