From 178ab4635cf20493f1d5c57ef1f6530ddbabf316 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Wed, 22 Mar 2023 11:57:28 -0700 Subject: [PATCH] TESTING: Add ByLabel and ByRecordSet tests (#2210) --- integrationTest/integration_test.go | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/integrationTest/integration_test.go b/integrationTest/integration_test.go index 24ac3205d..d78e2b48f 100644 --- a/integrationTest/integration_test.go +++ b/integrationTest/integration_test.go @@ -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.