mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 17:24:20 -04:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user