Description:
Currently, Gitea Actions CI/CD pipeline runs integration tests (e.g., HomeboxIntegrationTest) by connecting directly to my live/shared Postgres container (postgres:5432/vaessl_test) via the host network. This creates a tight infrastructure coupling, risks data contamination between pipeline runs, and prevents us from running parallel builds safely.
I need to migrate the integration tests to use Testcontainers. This will allow Spring Boot to dynamically provision and tear down an isolated PostgreSQL Docker instance on-demand during the Gradle test task, eliminating the need for hardcoded database secrets and shared network configurations in our workflow files.
Acceptance Criteria:
[ ] Add Testcontainers dependencies (spring-boot-testcontainers, testcontainers:postgresql) to backend/build.gradle.kts.
[ ] Refactor existing database integration tests to use the @Testcontainers and @Container annotations.
[ ] Configure dynamic database property injection via @DynamicPropertySource so tests discover the ephemeral container's randomized port.
[ ] Remove hardcoded database environment variables (DB_URL, DB_USERNAME, DB_PASSWORD) from the Gitea Actions workflow YAML file.
[ ] Verify that the Build and Analyze job passes cleanly in Gitea without relying on an external, pre-configured database instance.
Description:
Currently, Gitea Actions CI/CD pipeline runs integration tests (e.g., HomeboxIntegrationTest) by connecting directly to my live/shared Postgres container (postgres:5432/vaessl_test) via the host network. This creates a tight infrastructure coupling, risks data contamination between pipeline runs, and prevents us from running parallel builds safely.
I need to migrate the integration tests to use Testcontainers. This will allow Spring Boot to dynamically provision and tear down an isolated PostgreSQL Docker instance on-demand during the Gradle test task, eliminating the need for hardcoded database secrets and shared network configurations in our workflow files.
Acceptance Criteria:
[ ] Add Testcontainers dependencies (spring-boot-testcontainers, testcontainers:postgresql) to backend/build.gradle.kts.
[ ] Refactor existing database integration tests to use the @Testcontainers and @Container annotations.
[ ] Configure dynamic database property injection via @DynamicPropertySource so tests discover the ephemeral container's randomized port.
[ ] Remove hardcoded database environment variables (DB_URL, DB_USERNAME, DB_PASSWORD) from the Gitea Actions workflow YAML file.
[ ] Verify that the Build and Analyze job passes cleanly in Gitea without relying on an external, pre-configured database instance.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description:
Currently, Gitea Actions CI/CD pipeline runs integration tests (e.g., HomeboxIntegrationTest) by connecting directly to my live/shared Postgres container (postgres:5432/vaessl_test) via the host network. This creates a tight infrastructure coupling, risks data contamination between pipeline runs, and prevents us from running parallel builds safely.
I need to migrate the integration tests to use Testcontainers. This will allow Spring Boot to dynamically provision and tear down an isolated PostgreSQL Docker instance on-demand during the Gradle test task, eliminating the need for hardcoded database secrets and shared network configurations in our workflow files.
Acceptance Criteria:
[ ] Add Testcontainers dependencies (spring-boot-testcontainers, testcontainers:postgresql) to backend/build.gradle.kts.
[ ] Refactor existing database integration tests to use the @Testcontainers and @Container annotations.
[ ] Configure dynamic database property injection via @DynamicPropertySource so tests discover the ephemeral container's randomized port.
[ ] Remove hardcoded database environment variables (DB_URL, DB_USERNAME, DB_PASSWORD) from the Gitea Actions workflow YAML file.
[ ] Verify that the Build and Analyze job passes cleanly in Gitea without relying on an external, pre-configured database instance.