Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
philpotisk committed Apr 20, 2023
2 parents 0e7638a + 1ce93e9 commit be00f1b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
12 changes: 9 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.github.jk1.license.filter.LicenseBundleNormalizer
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.7.10"
kotlin("jvm") version "1.8.10"
kotlin("plugin.serialization") version "1.6.10"
id("org.owasp.dependencycheck") version "6.5.3"
id("com.github.jk1.dependency-license-report") version "2.0"
Expand Down Expand Up @@ -87,16 +87,22 @@ dependencies {

tasks.withType<Test> {
useJUnitPlatform()

// Use the following condition to optionally run the integration tests:
// > gradle build -PrunIntegrationTests
if (!project.hasProperty("runIntegrationTests")) {
exclude("id/walt/test/integration/**")
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(16))
languageVersion.set(JavaLanguageVersion.of(17))
}
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "16"
kotlinOptions.jvmTarget = "17"
}

tasks.named<CreateStartScripts>("startScripts") {
Expand Down
27 changes: 27 additions & 0 deletions src/test/kotlin/id/walt/test/DummyTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package id.walt.test

import io.kotest.core.spec.style.StringSpec
import io.kotest.core.test.TestCase

class DummyTest : StringSpec({

val enableTest = true


"my first test" {
println("my test")
}

"my disabled test".config(enabled = enableTest) {
println("my test")
}

}){
override suspend fun beforeTest(testCase: TestCase) {
super.beforeTest(testCase)

println("before")

}
}

13 changes: 13 additions & 0 deletions src/test/kotlin/id/walt/test/integration/ExcludedTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package id.walt.test.integration

import io.kotest.core.spec.style.StringSpec


class ExcludedTest : StringSpec({

"my excluded test" {
throw RuntimeException("should be excluded")
}

})

0 comments on commit be00f1b

Please sign in to comment.