From 60b1f0e7561306e4904beb0da2c57d1a330e6990 Mon Sep 17 00:00:00 2001 From: Torge Hamann <37174525+torge-hmn@users.noreply.github.com> Date: Sun, 17 Nov 2024 20:34:43 +0100 Subject: [PATCH] Change DLL-behaviour for test --- build.gradle.kts | 17 +++++++++-------- src/main/resources/application-test.properties | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 src/main/resources/application-test.properties diff --git a/build.gradle.kts b/build.gradle.kts index 5e3766a..814c6ff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,14 +29,13 @@ repositories { } dependencies { - implementation("org.zeroturnaround:zt-exec:1.12") - implementation("org.apache.commons:commons-lang3:3.17.0") + implementation("org.zeroturnaround:zt-exec:1.12") + implementation("org.apache.commons:commons-lang3:3.17.0")implementation("org.springframework.boot:spring-boot-autoconfigure") - implementation("org.springframework.boot:spring-boot-autoconfigure") - implementation("org.springframework.boot:spring-boot-starter-jdbc") - implementation("org.xerial:sqlite-jdbc") - implementation("org.springframework.boot:spring-boot-starter-data-jpa") - implementation("org.hibernate.orm:hibernate-community-dialects") + implementation("org.springframework.boot:spring-boot-starter-jdbc") + implementation("org.xerial:sqlite-jdbc") + implementation("org.springframework.boot:spring-boot-starter-data-jpa") + implementation("org.hibernate.orm:hibernate-community-dialects") implementation("org.springframework.boot:spring-boot-starter-security") implementation("org.springframework.boot:spring-boot-starter-web") @@ -54,6 +53,8 @@ dependencies { } tasks.withType { - useJUnitPlatform() + useJUnitPlatform() + + systemProperty("spring.profiles.active", "test") testLogging.showStandardStreams = true } diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties new file mode 100644 index 0000000..473dc02 --- /dev/null +++ b/src/main/resources/application-test.properties @@ -0,0 +1,2 @@ +#TODO: Use flyway for db setup +hibernate.hbm2ddl.auto=create-drop \ No newline at end of file