test(#119): add Testcontainers @DataJpaTest against real PostgreSQL 16

Adds spring-boot-testcontainers and testcontainers-postgresql deps.
PostgresContainerConfig declares a shared @ServiceConnection container
used by DocumentRepositoryTest, PersonRepositoryTest, and an
ApplicationContextTest smoke test.

Flyway migrations are imported via FlywayConfig and run on every test
execution, verifying the migration chain against a real PostgreSQL 16
container. No H2 is used.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-28 16:26:30 +01:00
parent 2fb5e4d17a
commit 4820360e40
6 changed files with 352 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
app:
s3:
endpoint: http://localhost:9000
access-key: dummy
secret-key: dummy
bucket: test-bucket
region: us-east-1
spring:
datasource:
url: will-be-overridden-by-testcontainers
username: test
password: test
mail:
host: localhost