From bac742fe816a349d75db28fc44e5cca22776bb1a Mon Sep 17 00:00:00 2001 From: Szymon Szukalski Date: Thu, 25 Jul 2024 10:36:15 +1000 Subject: Use in-memory database (H2) for tests --- src/test/resources/application-test.properties | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/resources/application-test.properties (limited to 'src/test') diff --git a/src/test/resources/application-test.properties b/src/test/resources/application-test.properties new file mode 100644 index 0000000..87666a1 --- /dev/null +++ b/src/test/resources/application-test.properties @@ -0,0 +1,12 @@ +# H2 Configuration +spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE +spring.datasource.driver-class-name=org.h2.Driver +spring.datasource.username=markr_test +spring.datasource.password=DekqFAQnRIjH2Kz1 +spring.h2.console.enabled=true +# Hibernate Configuration +spring.jpa.database-platform=org.hibernate.dialect.H2Dialect +spring.jpa.hibernate.ddl-auto=update +spring.jpa.show-sql=false +# Disable Open Session in View +spring.jpa.open-in-view=false \ No newline at end of file -- cgit v1.2.3