mirror of
https://github.com/pcvolkmer/etl-processor.git
synced 2025-04-19 17:26:51 +00:00
Move integration tests into own source-set
This commit is contained in:
parent
4051b5094c
commit
b75328b74d
@ -15,6 +15,18 @@ java {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
create("integrationTest") {
|
||||||
|
compileClasspath += sourceSets.main.get().output
|
||||||
|
runtimeClasspath += sourceSets.main.get().output
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val integrationTestImplementation: Configuration by configurations.getting {
|
||||||
|
extendsFrom(configurations.testImplementation.get())
|
||||||
|
extendsFrom(configurations.runtimeOnly.get())
|
||||||
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
compileOnly {
|
compileOnly {
|
||||||
extendsFrom(configurations.annotationProcessor.get())
|
extendsFrom(configurations.annotationProcessor.get())
|
||||||
@ -50,8 +62,8 @@ dependencies {
|
|||||||
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
|
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
|
||||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||||
testImplementation("io.projectreactor:reactor-test")
|
testImplementation("io.projectreactor:reactor-test")
|
||||||
testImplementation("org.testcontainers:junit-jupiter")
|
integrationTestImplementation("org.testcontainers:junit-jupiter")
|
||||||
testImplementation("org.testcontainers:postgresql")
|
integrationTestImplementation("org.testcontainers:postgresql")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<KotlinCompile> {
|
tasks.withType<KotlinCompile> {
|
||||||
@ -65,3 +77,11 @@ tasks.withType<Test> {
|
|||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task<Test>("integrationTest") {
|
||||||
|
description = "Runs integration tests"
|
||||||
|
|
||||||
|
testClassesDirs = sourceSets["integrationTest"].output.classesDirs
|
||||||
|
classpath = sourceSets["integrationTest"].runtimeClasspath
|
||||||
|
|
||||||
|
shouldRunAfter("test")
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user