Skip to content

Commit

Permalink
[patch] fixing teardown in digger tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfmurdock committed Oct 4, 2024
1 parent 1b21f60 commit 40a1874
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
9 changes: 9 additions & 0 deletions command-line-tools/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kotlin.code.style=official
kotlin.tests.individualTaskReports=true
org.gradle.caching=true
org.gradle.jvmargs=-Xmx3g
org.gradle.parallel=true
org.gradle.configuration-cache.problems=warn
org.gradle.configuration-cache=true
org.gradle.configureondemand=false
org.gradle.kotlin.dsl.allWarningsAsErrors=true
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.zegreatrob.tools.test.git.mergeInBranch
import com.zegreatrob.tools.test.git.removeDirectory
import com.zegreatrob.tools.test.git.switchToNewBranch
import kotlinx.coroutines.test.runTest
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
Expand All @@ -35,6 +36,7 @@ interface AllContributionTestSpec : SetupWithOverrides {
projectDir = createTempDirectory()
}

@AfterTest
fun tearDown() {
removeDirectory(projectDir)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import com.zegreatrob.tools.test.git.removeDirectory
import com.zegreatrob.tools.test.git.sleep
import com.zegreatrob.tools.test.git.switchToNewBranch
import kotlinx.coroutines.test.runTest
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
Expand All @@ -32,6 +33,7 @@ interface CurrentContributionTestSpec : SetupWithOverrides {
projectDir = createTempDirectory()
}

@AfterTest
fun tearDown() {
removeDirectory(projectDir)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ interface TagTestSpec {
projectDir = createTempDirectory()
}

@AfterTest
fun deleteProjectDir() {
removeDirectory(projectDir)
}

@BeforeTest
fun checkPrerequisites() {
assertEquals(
Expand All @@ -40,11 +45,6 @@ interface TagTestSpec {
)
}

@AfterTest
fun deleteProjectDir() {
removeDirectory(projectDir)
}

fun initializeGitRepo(
commits: List<String>,
initialTag: String? = null,
Expand Down

0 comments on commit 40a1874

Please sign in to comment.