docs: Installationsanleitung, gehärtete systemd-Unit und Beispielkonfiguration
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NBHF4R9EAejDJUMdwr6C68
This commit is contained in:
parent
2d223c5823
commit
4b287f9b1b
4 changed files with 633 additions and 0 deletions
25
internal/config/example_test.go
Normal file
25
internal/config/example_test.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Die ausgelieferte Beispielkonfiguration muss immer parsen und validieren.
|
||||
// Sonst laufen Kunden beim ersten Start in einen Fehler — und der Strict-Parser
|
||||
// würde jeden Tippfehler in der Vorlage gnadenlos melden.
|
||||
func TestExampleConfigParsesAndValidates(t *testing.T) {
|
||||
f, err := os.Open("../../deploy/config.example.yaml")
|
||||
if err != nil {
|
||||
t.Fatalf("Beispielkonfiguration fehlt: %v", err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
cfg, err := Parse(f)
|
||||
if err != nil {
|
||||
t.Fatalf("Beispielkonfiguration parst nicht: %v", err)
|
||||
}
|
||||
if err := cfg.Validate(); err != nil {
|
||||
t.Fatalf("Beispielkonfiguration ist nicht gültig: %v", err)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue