v0.27.2 minor update: long lines, switches, tls
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s

This commit is contained in:
lixen committed 2026-10-09 14:03:28 -04:00
1 parent 4513a9e62b
commit a1648ce17b
16 files changed
+159 -34

No files matched your search

+1 -5
View File
@@ -4,11 +4,7 @@ package config
// Config is the top-level configuration structure for the LogWisp application
type Config struct {
// Top-level flags for application control
ShowVersion bool `toml:"version"`
Check bool `toml:"check"` // build every plugin, report, exit: lw --check
Dump bool `toml:"dump"` // print the effective configuration, exit: lw --dump
Quiet bool `toml:"quiet"`
Quiet bool `toml:"quiet"`
// Console sinks without their own color: "auto" (a terminal, NO_COLOR
// unset, TERM not dumb), "always", "never"
+5 -1
View File
@@ -229,7 +229,8 @@ port = 9000
}
// A misspelled table path above a plugin's config drops that whole table, so
// the file itself is checked too; only config_file is tolerated, as documented.
// the file itself is checked too; only config_file, as documented, and the
// switches earlier lw --dump output wrote are tolerated.
func TestConfigFileRejectsUnknownKeys(t *testing.T) {
isolateConfig(t)
for key, body := range map[string]string{
@@ -237,6 +238,9 @@ func TestConfigFileRejectsUnknownKeys(t *testing.T) {
"logging.levle": "[logging]\nlevle = \"debug\"",
} {
testutil.WriteFile(t, "typo.toml", `config_file = "ignored.toml"
check = false
dump = false
version = false
[[pipelines]]
name = "typo"
[[pipelines.plugin_sources]]
+3
View File
@@ -174,5 +174,8 @@ func checkFileKeys(path string) error {
return err
}
delete(root, "config_file") // runtime metadata, documented as ignored in the file
for _, key := range []string{"version", "check", "dump"} {
delete(root, key) // command-line switches, which earlier lw --dump output wrote
}
return checkKeys(root, reflect.TypeOf(Config{}), "")
}