v0.327.1: files.<domain> reaches FileBrowser again — a file route by name, not Docker labels
gates / gates (push) Successful in 43s
gates / gates (push) Successful in 43s
v0.327.0's box walk: files.<domain> timed out on demo-hp and the N100. With labels, Traefik kept the address it chose at container start (on felhom-filebrowser, before the gate joined traefik-public). FileBrowser now carries no Traefik labels; dynamic/filebrowser.yml routes files.<domain> to http://filebrowser:80 by name, resolved per connection and only while the gate keeps it on traefik-public. Test extended, red-proved. Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -216,8 +216,8 @@ func TestControllerRoute(t *testing.T) {
|
||||
|
||||
func TestFileBrowserRender(t *testing.T) {
|
||||
compose := RenderFileBrowserCompose("demo-felhom.eu", nil)
|
||||
if !strings.Contains(compose, "Host(`files.demo-felhom.eu`)") {
|
||||
t.Errorf("domain not wired into filebrowser routing label: %q", compose)
|
||||
if !strings.Contains(compose, "# Domain: files.demo-felhom.eu") {
|
||||
t.Errorf("domain not named in the filebrowser compose header: %q", compose)
|
||||
}
|
||||
if !strings.Contains(compose, FileBrowserImage) {
|
||||
t.Errorf("expected pinned filebrowser image %q", FileBrowserImage)
|
||||
@@ -249,8 +249,10 @@ func TestFileBrowserRender(t *testing.T) {
|
||||
}
|
||||
|
||||
// R-1126 (D11 = A): FileBrowser starts OFF traefik-public — the box joins it there only after this run's default login
|
||||
// is checked — and on its own network, which the controller joins for that check. The Traefik labels stay, so the route
|
||||
// appears the moment the box joins it. RED-PROOF: the service back on traefik-public → this fails.
|
||||
// is checked — and on its own network, which the controller joins for that check. v0.327.1: NO Traefik labels — the
|
||||
// route is the file-provider route by NAME (a label route kept the address Traefik chose at container start, on the
|
||||
// wrong network, and timed out on demo-hp and the N100). RED-PROOF: the service back on traefik-public, or the labels
|
||||
// back → this fails.
|
||||
func TestFileBrowserRender_R1126_NotPublicAtStart(t *testing.T) {
|
||||
compose := RenderFileBrowserCompose("demo-felhom.eu", nil)
|
||||
svc := compose[strings.Index(compose, " filebrowser:"):strings.Index(compose, "\nvolumes:")]
|
||||
@@ -262,7 +264,13 @@ func TestFileBrowserRender_R1126_NotPublicAtStart(t *testing.T) {
|
||||
if !strings.Contains(nets, "- "+FileBrowserNetwork) || !strings.Contains(compose, "name: "+FileBrowserNetwork) {
|
||||
t.Fatalf("FileBrowser must sit on %s (named), got:\n%s", FileBrowserNetwork, compose)
|
||||
}
|
||||
if !strings.Contains(compose, "traefik.docker.network=traefik-public") || !strings.Contains(compose, "Host(`files.demo-felhom.eu`)") {
|
||||
t.Fatal("the Traefik labels must stay, so joining traefik-public is all that publishes it")
|
||||
if strings.Contains(compose, "traefik.") {
|
||||
t.Fatalf("FileBrowser must carry no Traefik labels (the route is the file route by name):\n%s", compose)
|
||||
}
|
||||
route := RenderFileBrowserRoute("demo-felhom.eu")
|
||||
for _, w := range []string{"Host(`files.demo-felhom.eu`)", `url: "http://filebrowser:80"`, "websecure", "tls: {}"} {
|
||||
if !strings.Contains(route, w) {
|
||||
t.Errorf("the file route misses %q:\n%s", w, route)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user