renaming from gitTally to Werkator

This commit is contained in:
mhoennig
2026-08-30 18:35:49 +02:00
parent 4d76744721
commit 7f550689dd
169 changed files with 1361 additions and 7504 deletions
@@ -1,4 +1,4 @@
package de.hoennig.gittally.commands
package de.hoennig.werkator.commands
import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
@@ -9,8 +9,8 @@ import java.nio.file.Paths
class SystemdServiceFilesTest : FunSpec() {
init {
test("unit name is derived from the sanitized repository directory name") {
SystemdServiceFiles.unitName(Paths.get("/srv/repos/my-repo")) shouldBe "gittally-my-repo.service"
SystemdServiceFiles.unitName(Paths.get("/srv/repos/my repo!")) shouldBe "gittally-my-repo-.service"
SystemdServiceFiles.unitName(Paths.get("/srv/repos/my-repo")) shouldBe "werkator-my-repo.service"
SystemdServiceFiles.unitName(Paths.get("/srv/repos/my repo!")) shouldBe "werkator-my-repo-.service"
}
test("unit file runs the server jar in the repository with restart and environment file") {
@@ -18,16 +18,16 @@ class SystemdServiceFilesTest : FunSpec() {
SystemdServiceFiles.unitFileContent(
repoRoot = Paths.get("/srv/repos/my-repo"),
javaExecutable = Paths.get("/usr/lib/jvm/java-21/bin/java"),
jarPath = Paths.get("/home/ci/bin/gittally.jar"),
envFile = Paths.get("/srv/repos/my-repo/.git/gittally/gittally.env"),
jarPath = Paths.get("/home/ci/bin/werkator.jar"),
envFile = Paths.get("/srv/repos/my-repo/.git/werkator/werkator.env"),
)
content shouldContain "Description=GitTally CI for my-repo"
content shouldContain "Description=werkator CI for my-repo"
content shouldContain "After=network-online.target docker.service"
content shouldContain "WorkingDirectory=/srv/repos/my-repo"
content shouldContain "EnvironmentFile=-/srv/repos/my-repo/.git/gittally/gittally.env"
content shouldContain "EnvironmentFile=-/srv/repos/my-repo/.git/werkator/werkator.env"
content shouldContain
"""ExecStart="/usr/lib/jvm/java-21/bin/java" ${'$'}JAVA_OPTS -jar "/home/ci/bin/gittally.jar" server"""
"""ExecStart="/usr/lib/jvm/java-21/bin/java" ${'$'}JAVA_OPTS -jar "/home/ci/bin/werkator.jar" server"""
content shouldContain "Restart=always"
content shouldContain "RestartSec=30"
content shouldContain "WantedBy=default.target"
@@ -38,13 +38,13 @@ class SystemdServiceFilesTest : FunSpec() {
SystemdServiceFiles.unitFileContent(
repoRoot = Paths.get("/srv/100%-repo"),
javaExecutable = Paths.get("/usr/bin/java"),
jarPath = Paths.get("/srv/100%-repo/gittally.jar"),
envFile = Paths.get("/srv/100%-repo/gittally.env"),
jarPath = Paths.get("/srv/100%-repo/werkator.jar"),
envFile = Paths.get("/srv/100%-repo/werkator.env"),
)
content shouldContain "WorkingDirectory=/srv/100%%-repo"
content shouldContain "EnvironmentFile=-/srv/100%%-repo/gittally.env"
content shouldContain """-jar "/srv/100%%-repo/gittally.jar" server"""
content shouldContain "EnvironmentFile=-/srv/100%%-repo/werkator.env"
content shouldContain """-jar "/srv/100%%-repo/werkator.jar" server"""
}
test("prune service cleans containers and images but never volumes") {
@@ -69,7 +69,7 @@ class SystemdServiceFilesTest : FunSpec() {
val content = SystemdServiceFiles.envFileContent()
content shouldContain "#JAVA_OPTS="
content shouldContain ".gittally.yml"
content shouldContain ".werkator.yml"
}
}
}