Stable per-branch report URLs and a reachable live view (v0.9.8)
A report directory holding a single page is now linked and served as a directory, so Gradle's --profile report has a stable permanent URL although its file name carries the build timestamp. The permanent link moves to the build it resolves to — the branch's latest green build — and appears on every build table instead of only the branches view. The Current tab gave way to a link in the artifacts column, shown while a build runs; /current itself stays routable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
c1869ea427
commit
962836beaf
@@ -150,6 +150,30 @@ class ArtifactFileControllerTest : FunSpec() {
|
||||
.andExpect(header().string("Cache-Control", "no-store, max-age=0"))
|
||||
}
|
||||
|
||||
test("directory URL serves the single page of an index-less report directory") {
|
||||
val profileDir = Files.createDirectories(artifactDir.resolve("reports/profile"))
|
||||
Files.writeString(profileDir.resolve("profile-2026-08-10-18-36-12.html"), "<html>profile</html>")
|
||||
|
||||
mockMvc
|
||||
.perform(get("/branches/main/reports/profile/"))
|
||||
.andExpect(status().isOk)
|
||||
.andExpect(content().string("<html>profile</html>"))
|
||||
mockMvc
|
||||
.perform(get("/artifacts/known-key/reports/profile/"))
|
||||
.andExpect(status().isOk)
|
||||
.andExpect(content().string("<html>profile</html>"))
|
||||
}
|
||||
|
||||
test("directory URL of an index-less report directory holding several pages answers 404") {
|
||||
val pmdDir = Files.createDirectories(artifactDir.resolve("reports/pmd"))
|
||||
Files.writeString(pmdDir.resolve("main.html"), "<html>main</html>")
|
||||
Files.writeString(pmdDir.resolve("test.html"), "<html>test</html>")
|
||||
|
||||
mockMvc
|
||||
.perform(get("/branches/main/reports/pmd/"))
|
||||
.andExpect(status().isNotFound)
|
||||
}
|
||||
|
||||
test("permanent URL with a bare trailing slash redirects to the artifact index page") {
|
||||
mockMvc
|
||||
.perform(get("/branches/main/"))
|
||||
|
||||
Reference in New Issue
Block a user