mirror of
https://github.com/coredns/coredns.git
synced 2026-06-03 15:50:22 -04:00
fix: reject invalid any and local config (#8133)
Signed-off-by: immanuwell <pchpr.00@list.ru>
This commit is contained in:
committed by
GitHub
parent
ce0e5a6f39
commit
4c07a287da
@@ -19,3 +19,17 @@ func TestSetup(t *testing.T) {
|
||||
t.Error("Expected plugin to be added to config")
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetupRejectsArgs(t *testing.T) {
|
||||
c := caddy.NewTestController("dns", `any example.org`)
|
||||
if err := setup(c); err == nil {
|
||||
t.Fatal("expected error for unexpected argument, got nil")
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetupRejectsBlockOptions(t *testing.T) {
|
||||
c := caddy.NewTestController("dns", `any { foo }`)
|
||||
if err := setup(c); err == nil {
|
||||
t.Fatal("expected error for unexpected block option, got nil")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user