Feature 57 (config and provisioning): modules declare config and provisions, their files rendered from templates; synced with main (issues of feature 57, 874)

This commit is contained in:
2026-10-16 07:37:43 +00:00
parent 1a2c917abf
commit 9652b2d5ce
771 changed files with 52063 additions and 1774 deletions
+4 -4
View File
@@ -55,16 +55,16 @@ func app(name, exec, mime string) string {
// The desktop's folders as found on 2026-10-05, in the module's file with that machine's settings.
func desktopUserDirs(t *testing.T) string {
raw, err := os.ReadFile(filepath.Join("..", "..", "config", "user-dirs.dirs"))
raw, err := os.ReadFile(filepath.Join("..", "..", "files", "user-dirs.dirs"))
if err != nil {
t.Fatal(err)
}
r := strings.NewReplacer("${setting:desktop-dir}", "$HOME/", "${setting:publicshare-dir}", "$HOME/", "${setting:videos-dir}", "$HOME/")
r := strings.NewReplacer("${config:desktop-dir}", "$HOME/", "${config:publicshare-dir}", "$HOME/", "${config:videos-dir}", "$HOME/")
return r.Replace(string(raw))
}
func TestTheFoldersAreReadAsXdgUserDirResolvesThem(t *testing.T) {
conf, _ := os.ReadFile(filepath.Join("..", "..", "config", "user-dirs.conf"))
conf, _ := os.ReadFile(filepath.Join("..", "..", "files", "user-dirs.conf"))
m := fake(t, map[string]string{
home + "/.config/user-dirs.dirs": desktopUserDirs(t),
home + "/.config/user-dirs.conf": string(conf),
@@ -159,7 +159,7 @@ func TestADuplicateGroupOrKeyIsReportedNotMerged(t *testing.T) {
// A machine with the mesh's list, the person's list, and some applications.
func mimeMachine(t *testing.T, extra map[string]string) *Machine {
mesh, err := os.ReadFile(filepath.Join("..", "..", "config", "mimeapps.list"))
mesh, err := os.ReadFile(filepath.Join("..", "..", "files", "mimeapps.list"))
if err != nil {
t.Fatal(err)
}