Skip to content

Commit

Permalink
[patch] fixing test problem with user configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfmurdock committed Aug 26, 2024
1 parent 8da26ff commit a9b4b87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.zegreatrob.tools.tagger

import com.zegreatrob.tools.adapter.git.runProcess
import org.gradle.testkit.runner.GradleRunner
import org.junit.jupiter.api.io.TempDir
import java.io.File
Expand Down Expand Up @@ -37,9 +36,6 @@ class TagFunctionalTest : TagTestSpec {
}

override fun execute(version: String): TestResult {
runProcess(listOf("git", "config", "user.email", "[email protected]"), this.projectDir.absolutePath)
runProcess(listOf("git", "config", "user.name", "RoB as Test"), this.projectDir.absolutePath)

val runner = GradleRunner.create()
runner.forwardOutput()
runner.withPluginClasspath()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.zegreatrob.tools.tagger

import com.zegreatrob.tools.adapter.git.GitAdapter
import com.zegreatrob.tools.adapter.git.runProcess
import com.zegreatrob.tools.test.git.disableGpgSign
import org.ajoberstar.grgit.Grgit
import org.ajoberstar.grgit.operation.CommitOp
Expand Down Expand Up @@ -49,6 +50,9 @@ interface TagTestSpec {
)
grgit.push()

runProcess(listOf("git", "config", "user.email", "[email protected]"), this.projectDir.absolutePath)
runProcess(listOf("git", "config", "user.name", "RoB as Test"), this.projectDir.absolutePath)

val expectedVersion = "1.0.0"
val result = execute(expectedVersion)
assertIsNot<TestResult.Failure>(result, message = "$result")
Expand Down

0 comments on commit a9b4b87

Please sign in to comment.