aboutsummaryrefslogtreecommitdiff
path: root/plugin/route53/setup_test.go
diff options
context:
space:
mode:
authorGravatar Jiacheng Xu <xjcmaxwellcjx@gmail.com> 2018-11-02 22:07:50 +0100
committerGravatar Miek Gieben <miek@miek.nl> 2018-11-02 21:07:50 +0000
commit165b4f86a37f40eb265761d1ca782184b0f36fd0 (patch)
tree45f4930589a36e517cee0d2670776cdcc27e147b /plugin/route53/setup_test.go
parent1a01e13db881d3b75cd31bf2a3564900d5b67d5b (diff)
downloadcoredns-165b4f86a37f40eb265761d1ca782184b0f36fd0.tar.gz
coredns-165b4f86a37f40eb265761d1ca782184b0f36fd0.tar.zst
coredns-165b4f86a37f40eb265761d1ca782184b0f36fd0.zip
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>
Diffstat (limited to 'plugin/route53/setup_test.go')
-rw-r--r--plugin/route53/setup_test.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugin/route53/setup_test.go b/plugin/route53/setup_test.go
index 98d7b2bce..99310dce4 100644
--- a/plugin/route53/setup_test.go
+++ b/plugin/route53/setup_test.go
@@ -36,10 +36,17 @@ func TestSetupRoute53(t *testing.T) {
}
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 {