mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
@@ -219,6 +219,10 @@ func mx(name string, prio uint16, target string) *rec {
|
||||
return r
|
||||
}
|
||||
|
||||
func ptr(name, target string) *rec {
|
||||
return makeRec(name, target, "PTR")
|
||||
}
|
||||
|
||||
func makeRec(name, target, typ string) *rec {
|
||||
return &rec{
|
||||
Name: name,
|
||||
@@ -288,6 +292,11 @@ var tests = []*TestCase{
|
||||
tc("Change to other name", mx("@", 5, "foo2.com."), mx("mail", 15, "foo3.com.")),
|
||||
tc("Change Priority", mx("@", 7, "foo2.com."), mx("mail", 15, "foo3.com.")),
|
||||
|
||||
//PTR
|
||||
tc("Empty"),
|
||||
tc("Create PTR record", ptr("4", "foo.com.")),
|
||||
tc("Modify PTR record", ptr("4", "bar.com.")),
|
||||
|
||||
//ALIAS
|
||||
tc("EMPTY"),
|
||||
tc("ALIAS at root", alias("@", "foo.com.")).IfHasCapability(providers.CanUseAlias),
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
$TTL 300
|
||||
@ IN SOA DEFAULT_NOT_SET. DEFAULT_NOT_SET. 2017041717 3600 600 604800 1440
|
||||
@ IN SOA DEFAULT_NOT_SET. DEFAULT_NOT_SET. 2017070632 3600 600 604800 1440
|
||||
IN NS ns1.otherdomain.tld.
|
||||
IN NS ns2.otherdomain.tld.
|
||||
|
||||
Reference in New Issue
Block a user