Files
felhom-controller/controller/internal/infra/kept_source_test.go
T

18 lines
627 B
Go

package infra
import (
"strings"
"testing"
)
// `09` §3 decision 36 — the kept-data source appears only when named, at /srv/megorzott.
func TestFileBrowser_KeptSourceOnlyWhenNamed(t *testing.T) {
if s := RenderFileBrowserConfigKept(nil, false, "", FileBrowserSSO{}); strings.Contains(s, FileBrowserKeptMount) {
t.Fatal("a kept source rendered with no label")
}
s := RenderFileBrowserConfigKept(nil, false, "Megőrzött adatok", FileBrowserSSO{})
if !strings.Contains(s, `path: "/srv/`+FileBrowserKeptMount+`"`) || !strings.Contains(s, `name: "Megőrzött adatok"`) {
t.Fatalf("kept source missing:\n%s", s)
}
}