mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-26 22:39:07 +01:00
[signal,proxy,relay] Add service configuration examples
Operators need concrete schemas for the new config-file flags. Add validated YAML examples for Relay/STUN, Signal, and Proxy.
This commit is contained in:
@@ -9,6 +9,13 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestExampleConfig(t *testing.T) {
|
||||
require.NoError(t, runCmd.ParseFlags(nil))
|
||||
cfg, err := loadConfig(runCmd, filepath.Join("..", "config.example.yaml"))
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "/etc/netbird/tls.crt", cfg.CertFile, "Example config should load")
|
||||
}
|
||||
|
||||
func TestLoadConfigPrecedence(t *testing.T) {
|
||||
configPath := filepath.Join(t.TempDir(), "signal.yaml")
|
||||
require.NoError(t, os.WriteFile(configPath, []byte(`
|
||||
|
||||
Reference in New Issue
Block a user