Paradaux

PAR-239

0

Treasury IT harness: build schema from economy-flyway migrations, not a bundled schema.sql

Pending ReleaseUnassignedTreasuryImprovement

Problem

The treasury integration tests loaded their schema from a bundled treasury/src/main/resources/schema.sql (via MariadbContainerExtension and the treasury-test.yml "Apply schema" step). That snapshot was removed during the monorepo migration, so the whole treasury test job — and the 95% coverage gate that depends on the ITs — was broken, and the snapshot duplicated the authoritative economy-flyway schema (drift risk).

Fix

Run the authoritative economy-flyway migrations with Flyway against the test DB instead:

  • MariadbContainerExtension now runs Flyway.migrate() (classpath:db/migration) on the DataSource (embedded MariaDB4j locally, the MariaDB service container in CI) — one source of schema truth, triggers included.
  • treasury/build.gradle.kts adds flyway-core + flyway-mysql (test scope) and stages the economy-flyway migrations onto the test classpath via processTestResources.
  • treasury-test.yml drops the manual schema.sql/mariadb-client steps; the service container just provides an empty treasury_test DB.

Verified

Full :treasury:test + :treasury:jacocoTestCoverageVerification pass locally via MariaDB4j with the Flyway-built schema (GovServiceIT, LedgerServiceTransferIT, etc.).

Prompted by the schema.sql removal; unblocks the suite and PAR-48's new ITs.

Comments

No comments yet.

Activity

  • tesks changed status to Status → Pending Release
  • tesks created the issue