Skip to content

[P1] Add isolated test profile and make the test suite pass from a clean clone #278

@jjoonleo

Description

@jjoonleo

Problem

The test suite cannot run in a clean local environment because Spring Boot tests attempt to connect to MySQL/Flyway using application configuration instead of an isolated test database/profile.

Why this is not production ready

If tests require manually provisioned external state, they are not a reliable safety net for production changes. Developers and CI cannot quickly verify regressions in auth, scheduling, persistence, and controller behavior.

Evidence

Running ./gradlew test completed compilation but failed test execution: 108 tests ran and 79 failed. The first failure was FlywaySqlException caused by com.mysql.cj.jdbc.exceptions.CommunicationsException / java.net.ConnectException while loading the Spring context.

Required work

  • Add src/test/resources/application-test.properties or equivalent test profile.
  • Use H2/Testcontainers/MySQL test container consistently for integration tests.
  • Ensure Flyway migrations run against the test database or are explicitly disabled for slice tests.
  • Make ./gradlew test pass from a fresh clone without local MySQL.
  • Document how to run unit, integration, and full test suites.

Acceptance criteria

  • ./gradlew test passes on a clean machine without manually running MySQL.
  • CI can run the same test command reliably.
  • Tests do not depend on developer-local .env or production-like secrets.
  • The test profile is clearly separated from production configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:stabilityReliability and runtime stabilityarea:testingTests and CI quality gatespriority:P1High: should be resolved before production launchproduction-readinessProduction readiness audit itemtype:opsOperational readiness task

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions