plugin/template: add upstream option (#1529)
* add upstream * docs * tests
This commit is contained in:
parent
ba573c0f40
commit
2cad04ec10
4 changed files with 33 additions and 1 deletions
|
@ -133,6 +133,20 @@ func TestSetupParse(t *testing.T) {
|
|||
}`,
|
||||
false,
|
||||
},
|
||||
{
|
||||
`template ANY ANY up.stream.local {
|
||||
answer "up.stream.local 5 IN CNAME up.river.local"
|
||||
upstream
|
||||
}`,
|
||||
false,
|
||||
},
|
||||
{
|
||||
`template ANY ANY up.stream.local {
|
||||
answer "up.stream.local 5 IN CNAME up.river.local"
|
||||
upstream invalid-upstream-argument
|
||||
}`,
|
||||
true,
|
||||
},
|
||||
}
|
||||
for i, test := range tests {
|
||||
c := caddy.NewTestController("dns", test.inputFileRules)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue