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
@@ -15,16 +15,16 @@ func TestTheFilesSayWhatTheToolsCompareAgainst(t *testing.T) {
t.Fatalf("%s %s", m.Module, m.Version)
}
locale := m.resource(t, "locale")
if locale["path"] != "/etc/locale.conf" || locale["into"] != nil || !strings.Contains(locale["content"].(string), "\nLANG="+MeshLang+"\n") {
if locale["path"] != "/etc/locale.conf" || locale["into"] != nil || !strings.Contains(templateText(t, locale), "\nLANG="+MeshLang+"\n") {
t.Fatalf("locale: %v", locale)
}
keymap := m.resource(t, "keymap")
if keymap["path"] != "/etc/vconsole.conf" || !strings.Contains(keymap["content"].(string), "\nKEYMAP="+MeshKeymap+"\n") {
if keymap["path"] != "/etc/vconsole.conf" || !strings.Contains(templateText(t, keymap), "\nKEYMAP="+MeshKeymap+"\n") {
t.Fatalf("keymap: %v", keymap)
}
for _, r := range []resource{locale, keymap} {
var settings []string
for _, l := range strings.Split(r["content"].(string), "\n") {
for _, l := range strings.Split(templateText(t, r), "\n") {
if l != "" && !strings.HasPrefix(l, "#") {
settings = append(settings, l)
}