add plugin service integration test
This commit is contained in:
10
README.md
10
README.md
@@ -76,6 +76,16 @@ container and docker ports can be a single port (e.g., 8080) or multiple ports s
|
|||||||
* `containerNetworkCreate` creates network.
|
* `containerNetworkCreate` creates network.
|
||||||
* `containerNetworkRemove` removes network.
|
* `containerNetworkRemove` removes network.
|
||||||
|
|
||||||
|
### Plugin Service Integration Test
|
||||||
|
|
||||||
|
id `ltd.hlaeja.plugin.hlaeja-common-plugin.service-integration-test`
|
||||||
|
|
||||||
|
Adding task `integrationTest` to run integration test, add to `verification` group and add to task `check`.
|
||||||
|
|
||||||
|
Adding intellij support `src/integration-test/java`, `src/integration-test/kotlin`, and `src/integration-test/resources` as test module in intellij.
|
||||||
|
|
||||||
|
Adding dependencies support `integrationTestImplementation()`, and `integrationTestRuntimeOnly()` as part of Gradle.
|
||||||
|
|
||||||
## Releasing plugin
|
## Releasing plugin
|
||||||
|
|
||||||
Run `release.sh` script from `master` branch.
|
Run `release.sh` script from `master` branch.
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
plugins {
|
||||||
|
id("idea")
|
||||||
|
|
||||||
|
kotlin("jvm")
|
||||||
|
}
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
fun DependencyHandler.integrationTestImplementation(
|
||||||
|
dependencyNotation: Any,
|
||||||
|
): Dependency? = add("integrationTestImplementation", dependencyNotation)
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
fun DependencyHandler.integrationTestRuntimeOnly(
|
||||||
|
dependencyNotation: Any,
|
||||||
|
): Dependency? = add("integrationTestRuntimeOnly", dependencyNotation)
|
||||||
|
|
||||||
|
sourceSets.create("integration-test") {
|
||||||
|
compileClasspath += sourceSets["main"].output
|
||||||
|
runtimeClasspath += sourceSets["main"].output
|
||||||
|
idea.module {
|
||||||
|
testSources.from(sourceSets["integration-test"].kotlin.srcDirs, sourceSets["integration-test"].java.srcDirs)
|
||||||
|
testResources.from(sourceSets["integration-test"].resources.srcDirs)
|
||||||
|
}
|
||||||
|
configurations.let {
|
||||||
|
it["integrationTestImplementation"].extendsFrom(configurations.implementation.get())
|
||||||
|
it["integrationTestRuntimeOnly"].extendsFrom(configurations.runtimeOnly.get())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
register<Test>("integrationTest") {
|
||||||
|
description = "Runs integration tests."
|
||||||
|
group = "verification"
|
||||||
|
testClassesDirs = sourceSets["integration-test"].output.classesDirs
|
||||||
|
classpath = sourceSets["integration-test"].runtimeClasspath
|
||||||
|
}
|
||||||
|
check { dependsOn(getByName("integrationTest")) }
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("ltd.hlaeja.plugin.hlaeja-common-plugin.common")
|
id("ltd.hlaeja.plugin.hlaeja-common-plugin.common")
|
||||||
id("ltd.hlaeja.plugin.hlaeja-common-plugin.service-container")
|
id("ltd.hlaeja.plugin.hlaeja-common-plugin.service-container")
|
||||||
|
id("ltd.hlaeja.plugin.hlaeja-common-plugin.service-integration-test")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user