Leo/Backend/UnitTest #138

Merged
LeoMoulin merged 17 commits from Leo/Backend/UnitTest into master 2024-03-18 19:21:55 +01:00
3 changed files with 5 additions and 1 deletions
Showing only changes of commit 611e7167f9 - Show all commits

View File

@ -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:

View File

@ -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;

View File

@ -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 {
Review

Manque le test sur le Delete (normal g fini à 00h)

Manque le test sur le Delete (normal g fini à 00h)
Review

c'est fait

c'est fait
@LocalServerPort
private Integer port;