mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02:00
Add listener policy to default generated config
So technical user can figure thing out based on self-documented commands, without referring to actual documentation.
This commit is contained in:
+6
-1
@@ -54,7 +54,12 @@ func TestLoadDefaultConfig(t *testing.T) {
|
||||
cfg := defaultConfig(t)
|
||||
validate := validator.New()
|
||||
require.NoError(t, ctrld.ValidateConfig(validate, cfg))
|
||||
assert.Len(t, cfg.Listener, 1)
|
||||
if assert.Len(t, cfg.Listener, 1) {
|
||||
l0 := cfg.Listener["0"]
|
||||
require.NotNil(t, l0.Policy)
|
||||
assert.Len(t, l0.Policy.Networks, 1)
|
||||
assert.Len(t, l0.Policy.Rules, 2)
|
||||
}
|
||||
assert.Len(t, cfg.Upstream, 2)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user