Enhancement: Empty config

When user starts kportal for the first time, and there is no config file,
kportal should create an empty config file with default values and empty
forwarding rules, so that user can easily edit the config file and add their
own rules.
This commit is contained in:
2025-11-29 12:44:33 +00:00
parent 518879dc56
commit a297ba7073
7 changed files with 385 additions and 8 deletions
+2 -2
View File
@@ -124,8 +124,8 @@ func TestManager_Start_EmptyForwards(t *testing.T) {
cfg := &config.Config{}
err = manager.Start(cfg)
assert.Error(t, err)
assert.Contains(t, err.Error(), "no forwards configured")
// Empty config is now valid - allows users to add forwards via TUI
assert.NoError(t, err)
}
// TestManager_Reload_NilConfig tests reloading with nil config