Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelgbanks committed Oct 30, 2023
1 parent 124907e commit fd62eeb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions buildSrc/src/main/kotlin/plugins/TestsPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ import org.gradle.kotlin.dsl.*
import plugins.IslePlugin.Companion.isDockerProject
import plugins.SharedPropertiesPlugin.Companion.isleRepository
import plugins.SharedPropertiesPlugin.Companion.isleTag
import java.io.BufferedReader
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.InputStreamReader
import java.time.Duration
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ExecutorService
Expand Down Expand Up @@ -88,7 +86,7 @@ class TestsPlugin : Plugin<Project> {
"isle.${image}.digest",
""
) as String).ifEmpty { "${project.isleRepository}/${image}:${project.isleTag}" }
}
}.plus(Pair("HOME", System.getenv("HOME")))
})

@get:Internal
Expand Down Expand Up @@ -252,7 +250,7 @@ class TestsPlugin : Plugin<Project> {
commandLine = baseArguments + listOf("stop")
}
exitCodes.forEach { (service, _) ->
val process = ProcessBuilder().run {
ProcessBuilder().run {
directory(project.projectDir)
command(baseArguments + listOf("logs", service))
redirectOutput(logs.get().asFile.resolve("${service}.log"))
Expand Down Expand Up @@ -305,7 +303,7 @@ class TestsPlugin : Plugin<Project> {
dependsOn(cleanUpBefore)
}

val cleanUpAfter by tasks.registering(DockerComposeDown::class) {
tasks.register<DockerComposeDown>("cleanUpAfter") {
group = "Isle Tests"
description = "Clean up resources after running test"
}
Expand All @@ -314,7 +312,6 @@ class TestsPlugin : Plugin<Project> {
group = "Isle Tests"
description = "Perform test"
dependsOn(setUp)
//finalizedBy(cleanUpAfter)
doFirst {
if (project.isleTestPull) {
project.exec {
Expand Down

0 comments on commit fd62eeb

Please sign in to comment.