From ba4a286403198d642c5140d10cf31ed2e584b637 Mon Sep 17 00:00:00 2001 From: "Donald F. Coffin" Date: Thu, 1 Jan 2026 15:54:59 -0500 Subject: [PATCH] This commit addresses configuration inconsistencies between CI/CD pipeline and TestContainers setup that would prevent PostgreSQL integration tests from running correctly when re-enabled. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changes Made ### 1. Fixed Flyway Migration Paths - Files: application-testcontainers-postgresql.yml (datacustodian & thirdparty) - Before: classpath:db/migration/postgresql (non-existent path) - After: classpath:db/migration,classpath:db/vendor/postgres - Impact: Integration tests can now find and execute Flyway migrations ### 2. Upgraded PostgreSQL Version in CI/CD - File: .github/workflows/ci.yml - Before: postgres:15 - After: postgres:18 - Impact: Aligns CI/CD with TestContainers environment ### 3. Updated Test Documentation - File: DataCustodianApplicationPostgresTest.java - Updated @Disabled annotation to reflect: - Configuration issues (Issue #55) are now RESOLVED - UUID type mismatch (Issue #53) still blocks test execution - Tests will be re-enabled after MULTI_PHASE schema compliance plan ## Test Results Verified that fixing Issue #55 configuration problems does NOT resolve Issue #53 UUID type mismatch. The test still fails with: Schema validation: wrong column type encountered in column [id]; found [bpchar (Types#CHAR)], but expecting [uuid (Types#UUID)] This confirms Issue #53 requires V4 migration script to convert CHAR(36) columns to native UUID type, which will be implemented after MULTI_PHASE schema compliance plan completes. ## Related Issues - Fixes #55 - PostgreSQL configuration mismatches - Ref #53 - UUID CHAR(36) type mismatch (still blocking) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 " --- .github/workflows/ci.yml | 2 +- .../migration/DataCustodianApplicationPostgresTest.java | 8 +++++--- .../resources/application-testcontainers-postgresql.yml | 2 +- .../resources/application-testcontainers-postgresql.yml | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ff3e311..012ca837 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: --health-retries=3 postgres: - image: postgres:15 + image: postgres:18 env: POSTGRES_PASSWORD: postgres POSTGRES_DB: test_db diff --git a/openespi-common/src/test/java/org/greenbuttonalliance/espi/common/migration/DataCustodianApplicationPostgresTest.java b/openespi-common/src/test/java/org/greenbuttonalliance/espi/common/migration/DataCustodianApplicationPostgresTest.java index b05d0844..ba8cbcd2 100644 --- a/openespi-common/src/test/java/org/greenbuttonalliance/espi/common/migration/DataCustodianApplicationPostgresTest.java +++ b/openespi-common/src/test/java/org/greenbuttonalliance/espi/common/migration/DataCustodianApplicationPostgresTest.java @@ -27,9 +27,9 @@ import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.DynamicPropertyRegistry; import org.springframework.test.context.DynamicPropertySource; -import org.testcontainers.postgresql.PostgreSQLContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; +import org.testcontainers.postgresql.PostgreSQLContainer; import java.sql.Connection; import java.sql.ResultSet; @@ -52,8 +52,10 @@ @Disabled("Temporarily disabled due to Issue #53: PostgreSQL UUID CHAR(36) type mismatch. " + "JPA entities use @GeneratedValue(strategy = GenerationType.UUID) expecting native UUID type, " + "but Flyway migrations use CHAR(36) for MySQL/H2 compatibility. " + - "This will be resolved after MULTI_PHASE schema compliance plan completes. " + - "See: https://github.com/GreenButtonAlliance/OpenESPI-GreenButton-Java/issues/53") + "Configuration issues (Issue #55) have been resolved - Flyway paths and PostgreSQL version are correct. " + + "This test will be re-enabled after MULTI_PHASE schema compliance plan completes and UUID conversion is implemented. " + + "See: https://github.com/GreenButtonAlliance/OpenESPI-GreenButton-Java/issues/53 " + + "and https://github.com/GreenButtonAlliance/OpenESPI-GreenButton-Java/issues/55") class DataCustodianApplicationPostgresTest { @Container diff --git a/openespi-datacustodian/src/test/resources/application-testcontainers-postgresql.yml b/openespi-datacustodian/src/test/resources/application-testcontainers-postgresql.yml index 84b643a0..59c62817 100644 --- a/openespi-datacustodian/src/test/resources/application-testcontainers-postgresql.yml +++ b/openespi-datacustodian/src/test/resources/application-testcontainers-postgresql.yml @@ -26,7 +26,7 @@ spring: flyway: enabled: true baseline-on-migrate: true - locations: classpath:db/migration/postgresql + locations: classpath:db/migration,classpath:db/vendor/postgres # Faster testing configuration main: diff --git a/openespi-thirdparty/src/test/resources/application-testcontainers-postgresql.yml b/openespi-thirdparty/src/test/resources/application-testcontainers-postgresql.yml index 53c0f153..a7efe7b8 100644 --- a/openespi-thirdparty/src/test/resources/application-testcontainers-postgresql.yml +++ b/openespi-thirdparty/src/test/resources/application-testcontainers-postgresql.yml @@ -26,7 +26,7 @@ spring: flyway: enabled: true baseline-on-migrate: true - locations: classpath:db/migration/postgresql + locations: classpath:db/migration,classpath:db/vendor/postgres # Faster testing configuration main: