Skip to content

Commit fb5af7b

Browse files
author
Yuriy Bezsonov
committed
fix tests
1 parent ed1d323 commit fb5af7b

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

apps/java25/unicorn-store-spring/src/test/java/com/unicorn/store/integration/TestInfrastructureInitializer.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ private void initializeTestcontainers() {
4848
System.setProperty("spring.datasource.username", postgres.getUsername());
4949
System.setProperty("spring.datasource.password", postgres.getPassword());
5050
System.setProperty("spring.datasource.driver-class-name", "org.postgresql.Driver");
51+
52+
// Let Hibernate create schema (matches Aurora production behavior)
53+
System.setProperty("spring.sql.init.mode", "never");
54+
System.setProperty("spring.jpa.hibernate.ddl-auto", "create");
5155
}
5256

5357
// Start LocalStack container with EventBridge (events service)
@@ -84,6 +88,10 @@ private void initializeH2Fallback() {
8488
System.setProperty("spring.datasource.password", "password");
8589
System.setProperty("spring.datasource.driver-class-name", "org.h2.Driver");
8690

91+
// Let Hibernate create schema
92+
System.setProperty("spring.sql.init.mode", "never");
93+
System.setProperty("spring.jpa.hibernate.ddl-auto", "create");
94+
8795
// Set up mock AWS properties
8896
System.setProperty("aws.accessKeyId", "test");
8997
System.setProperty("aws.secretAccessKey", "test");

apps/java25/unicorn-store-spring/src/test/resources/schema.sql

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)