plugin/route53: make the upstream address in route53 plugin optional. (#2263)
* Make the upstream in route53 plugin optional. Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com> * Add 2 tests for upstream in route53. Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com> * Change the readme. Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>
This commit is contained in:
parent
1a01e13db8
commit
165b4f86a3
3 changed files with 10 additions and 8 deletions
|
@ -35,11 +35,18 @@ func TestSetupRoute53(t *testing.T) {
|
|||
t.Fatalf("Expected errors, but got: %v", err)
|
||||
}
|
||||
|
||||
c = caddy.NewTestController("dns", `route53 example.org:12345678 {
|
||||
upstream 10.0.0.1
|
||||
}`)
|
||||
if err := setup(c, f); err != nil {
|
||||
t.Fatalf("Expected no errors, but got: %v", err)
|
||||
}
|
||||
|
||||
c = caddy.NewTestController("dns", `route53 example.org:12345678 {
|
||||
upstream
|
||||
}`)
|
||||
if err := setup(c, f); err == nil {
|
||||
t.Fatalf("Expected errors, but got: %v", err)
|
||||
if err := setup(c, f); err != nil {
|
||||
t.Fatalf("Expected no errors, but got: %v", err)
|
||||
}
|
||||
|
||||
c = caddy.NewTestController("dns", `route53 example.org:12345678 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue