TESTING: Add ByLabel and ByRecordSet tests (#2210)

This commit is contained in:
Tom Limoncelli 2023-03-22 11:57:28 -07:00 committed by GitHub
parent c3df299e51
commit 178ab4635c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.