mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-24 15:43:08 +08:00
TESTING: Add ByLabel and ByRecordSet tests (#2210)
This commit is contained in:
parent
c3df299e51
commit
178ab4635c
1 changed files with 54 additions and 0 deletions
|
@ -898,6 +898,60 @@ func makeTests(t *testing.T) []*TestGroup {
|
|||
tc("Upcase both", mx("BAR", 5, "BAR.COM."), a("decoy", "3.3.3.3")),
|
||||
),
|
||||
|
||||
// Make sure we can manipulate one DNS record when there is
|
||||
// another at the same label.
|
||||
testgroup("testByLabel",
|
||||
tc("initial",
|
||||
a("foo", "1.2.3.4"),
|
||||
a("foo", "2.3.4.5"),
|
||||
),
|
||||
tc("changeOne",
|
||||
a("foo", "1.2.3.4"),
|
||||
a("foo", "3.4.5.6"), // Change
|
||||
),
|
||||
tc("deleteOne",
|
||||
a("foo", "1.2.3.4"),
|
||||
//a("foo", "3.4.5.6"), // Delete
|
||||
),
|
||||
tc("addOne",
|
||||
a("foo", "1.2.3.4"),
|
||||
a("foo", "3.4.5.6"), // Add
|
||||
),
|
||||
),
|
||||
|
||||
// Make sure we can manipulate one DNS record when there is
|
||||
// another at the same RecordSet.
|
||||
testgroup("testByRecordSet",
|
||||
tc("initial",
|
||||
a("bar", "1.2.3.4"),
|
||||
a("foo", "2.3.4.5"),
|
||||
a("foo", "3.4.5.6"),
|
||||
mx("foo", 10, "foo.**current-domain**"),
|
||||
mx("foo", 20, "bar.**current-domain**"),
|
||||
),
|
||||
tc("changeOne",
|
||||
a("bar", "1.2.3.4"),
|
||||
a("foo", "2.3.4.5"),
|
||||
a("foo", "8.8.8.8"), // Change
|
||||
mx("foo", 10, "foo.**current-domain**"),
|
||||
mx("foo", 20, "bar.**current-domain**"),
|
||||
),
|
||||
tc("deleteOne",
|
||||
a("bar", "1.2.3.4"),
|
||||
a("foo", "2.3.4.5"),
|
||||
//a("foo", "8.8.8.8"), // Delete
|
||||
mx("foo", 10, "foo.**current-domain**"),
|
||||
mx("foo", 20, "bar.**current-domain**"),
|
||||
),
|
||||
tc("addOne",
|
||||
a("bar", "1.2.3.4"),
|
||||
a("foo", "2.3.4.5"),
|
||||
a("foo", "8.8.8.8"), // Add
|
||||
mx("foo", 10, "foo.**current-domain**"),
|
||||
mx("foo", 20, "bar.**current-domain**"),
|
||||
),
|
||||
),
|
||||
|
||||
testgroup("IDNA",
|
||||
not("SOFTLAYER"),
|
||||
// SOFTLAYER: fails at direct internationalization, punycode works, of course.
|
||||
|
|
Loading…
Reference in a new issue