- Добавил интеграционные тесты с помощью Testcontainers

- Убрал сохранение данных сессии в БД, с ним не работало тестирования логина пользователя.
- Изменил стратегию генерации Id для сообщений с 'AUTO' на `IDENTITY`. Без этого ругалось на дублирования id при добавлении нового сообщения в тестах.

https://www.youtube.com/watch?v=Lnc3o8cCwZY&list=PLU2ftbIeotGpAYRP9Iv2KLIwK36-o_qYk&index=26
This commit is contained in:
Leonid
2025-03-02 11:06:11 +03:00
parent 6e4e358dee
commit 3530e9e28d
15 changed files with 323 additions and 62 deletions

25
pom.xml
View File

@@ -41,6 +41,26 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mysql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-testcontainers</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
@@ -81,12 +101,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-jdbc</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>