Add route53 plugin (#1390)
* Update vendor Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Add route53 plugin This fix adds route53 plugin so that it is possible to query route53 record through CoreDNS. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
parent
d699b89063
commit
584dd87c70
352 changed files with 81636 additions and 1798 deletions
37
plugin/route53/setup_test.go
Normal file
37
plugin/route53/setup_test.go
Normal file
|
@ -0,0 +1,37 @@
|
|||
package route53
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/credentials"
|
||||
"github.com/aws/aws-sdk-go/service/route53/route53iface"
|
||||
"github.com/mholt/caddy"
|
||||
)
|
||||
|
||||
func TestSetupRoute53(t *testing.T) {
|
||||
f := func(credential *credentials.Credentials) route53iface.Route53API {
|
||||
return mockedRoute53{}
|
||||
}
|
||||
|
||||
c := caddy.NewTestController("dns", `route53`)
|
||||
if err := setup(c, f); err != nil {
|
||||
t.Fatalf("Expected no errors, but got: %v", err)
|
||||
}
|
||||
|
||||
c = caddy.NewTestController("dns", `route53 :`)
|
||||
if err := setup(c, f); err == nil {
|
||||
t.Fatalf("Expected errors, but got: %v", err)
|
||||
}
|
||||
|
||||
c = caddy.NewTestController("dns", `route53 example.org:12345678`)
|
||||
if err := setup(c, f); err != nil {
|
||||
t.Fatalf("Expected no errors, but got: %v", err)
|
||||
}
|
||||
|
||||
c = caddy.NewTestController("dns", `route53 example.org:12345678 {
|
||||
aws_access_key
|
||||
}`)
|
||||
if err := setup(c, f); err == nil {
|
||||
t.Fatalf("Expected errors, but got: %v", err)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue