mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Digitalocean provider (#171)
* Implement Digitalocean provider * Vendor digitalocean lib * Enable SRV for Digitalocean and fix the tests * Test cname etc. records pointing to the same domain
This commit is contained in:
committed by
Tom Limoncelli
parent
638ee45e6c
commit
ad27cc9b3b
@@ -110,6 +110,9 @@ func runTests(t *testing.T, prv providers.DNSServiceProvider, domainName string,
|
||||
for _, r := range tst.Records {
|
||||
rc := models.RecordConfig(*r)
|
||||
rc.NameFQDN = dnsutil.AddOrigin(rc.Name, domainName)
|
||||
if rc.Target == "**current-domain**" {
|
||||
rc.Target = domainName + "."
|
||||
}
|
||||
dom.Records = append(dom.Records, &rc)
|
||||
}
|
||||
dom2, _ := dom.Copy()
|
||||
@@ -290,11 +293,13 @@ var tests = []*TestCase{
|
||||
tc("Change it", cname("foo", "google2.com.")),
|
||||
tc("Change to A record", a("foo", "1.2.3.4")),
|
||||
tc("Change back to CNAME", cname("foo", "google.com.")),
|
||||
tc("Record pointing to @", cname("foo", "**current-domain**")),
|
||||
|
||||
//NS
|
||||
tc("Empty"),
|
||||
tc("NS for subdomain", ns("xyz", "ns2.foo.com.")),
|
||||
tc("Dual NS for subdomain", ns("xyz", "ns2.foo.com."), ns("xyz", "ns1.foo.com.")),
|
||||
tc("Record pointing to @", ns("foo", "**current-domain**")),
|
||||
|
||||
//IDNAs
|
||||
tc("Empty"),
|
||||
@@ -311,6 +316,7 @@ var tests = []*TestCase{
|
||||
tc("Delete one", mx("@", 5, "foo2.com."), mx("@", 15, "foo3.com.")),
|
||||
tc("Change to other name", mx("@", 5, "foo2.com."), mx("mail", 15, "foo3.com.")),
|
||||
tc("Change Preference", mx("@", 7, "foo2.com."), mx("mail", 15, "foo3.com.")),
|
||||
tc("Record pointing to @", mx("foo", 8, "**current-domain**")),
|
||||
|
||||
//PTR
|
||||
tc("Empty").IfHasCapability(providers.CanUsePTR),
|
||||
|
Reference in New Issue
Block a user