feat(backend): /info meldet die Taiga-Web-Basis für Ticket-Links (D91)
WERKBAUM_TAIGA_WEB_URL (das Taiga-Frontend, nicht aus der API-URL ableitbar) kommt als taigaWeb in GET /api/v1/info — ohne Schrägstrich am Ende, fehlt unkonfiguriert. deploy-backend.sh zieht die Zeile aus der lokalen .env idempotent in die Server-Umgebung nach. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
83eb6ff77f
commit
55cade1a65
@@ -41,6 +41,9 @@ class TaigaApiTest {
|
||||
val result = client.get().uri("/api/v1/info").exchange().returnResult(String::class.java)
|
||||
result.status.value() shouldBe 200
|
||||
result.responseBody!! shouldContain "\"taiga\":true"
|
||||
// Die Web-Basis für die Ticket-Links (D91-Nachtrag 5) — ohne den
|
||||
// konfigurierten Schrägstrich am Ende.
|
||||
result.responseBody!! shouldContain "\"taigaWeb\":\"https://plan.example.test\""
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -154,6 +157,8 @@ class TaigaApiTest {
|
||||
fun taigaUrl(registry: DynamicPropertyRegistry) {
|
||||
startStub()
|
||||
registry.add("werkbaum.taiga.api-url") { "http://127.0.0.1:${stub.address.port}/api/v1" }
|
||||
// Mit abschließendem Schrägstrich — /info muss ihn abstreifen.
|
||||
registry.add("werkbaum.taiga.web-url") { "https://plan.example.test/" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package de.werkbaum.api
|
||||
|
||||
import io.kotest.matchers.shouldBe
|
||||
import io.kotest.matchers.string.shouldContain
|
||||
import io.kotest.matchers.string.shouldNotContain
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureRestTestClient
|
||||
@@ -36,6 +37,9 @@ class TaigaDisabledTest {
|
||||
val result = client.get().uri("/api/v1/info").exchange().returnResult(String::class.java)
|
||||
result.status.value() shouldBe 200
|
||||
result.responseBody!! shouldContain "\"taiga\":false"
|
||||
// Ohne konfigurierte Web-Basis gibt es keine Ticket-Links — und keine
|
||||
// leere Zeichenkette, an die ein Client Pfade anhängen könnte.
|
||||
result.responseBody!! shouldNotContain "\"taigaWeb\":\""
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user