diff --git a/.gitea/workflows/backend.yaml b/.gitea/workflows/backend.yaml index ff4bdb8..5115455 100644 --- a/.gitea/workflows/backend.yaml +++ b/.gitea/workflows/backend.yaml @@ -17,7 +17,7 @@ jobs: distribution: 'temurin' - uses: gradle/gradle-build-action@v3 - name: building - run: ./gradlew backend:build + run: ./gradlew backend:build -x test Test-backend: runs-on: ubuntu-latest steps: diff --git a/backend/src/test/java/ovh/herisson/Clyde/Endpoints/StorageControllerTest.java b/backend/src/test/java/ovh/herisson/Clyde/Endpoints/StorageControllerTest.java index 693d0fa..e1f918e 100644 --- a/backend/src/test/java/ovh/herisson/Clyde/Endpoints/StorageControllerTest.java +++ b/backend/src/test/java/ovh/herisson/Clyde/Endpoints/StorageControllerTest.java @@ -14,6 +14,7 @@ import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.http.MediaType; import org.springframework.mock.web.MockMultipartFile; +import org.springframework.test.context.ActiveProfiles; import org.testcontainers.containers.PostgreSQLContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; @@ -33,6 +34,7 @@ import static io.restassured.RestAssured.with; @Testcontainers @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles(value ="dev") public class StorageControllerTest { @LocalServerPort private Integer port; diff --git a/backend/src/test/java/ovh/herisson/Clyde/Endpoints/UserControllerTest.java b/backend/src/test/java/ovh/herisson/Clyde/Endpoints/UserControllerTest.java index e831be4..9954a41 100644 --- a/backend/src/test/java/ovh/herisson/Clyde/Endpoints/UserControllerTest.java +++ b/backend/src/test/java/ovh/herisson/Clyde/Endpoints/UserControllerTest.java @@ -14,6 +14,7 @@ import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatusCode; +import org.springframework.test.context.ActiveProfiles; import org.testcontainers.containers.PostgreSQLContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; @@ -35,6 +36,7 @@ import static org.hamcrest.Matchers.equalTo; @Testcontainers @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles(value = "dev") public class UserControllerTest { @LocalServerPort private Integer port;