Commit 60579ee6 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #30433 from madhusudancs/fed-dns-provider-test-A-CNAME-fix

Automatic merge from submit-queue Update dnsprovider multi-type support test to test for an A-record and an AAAA-record. Having an A-record and a CNAME-record in the tests led to a confusion that dns providers support such configurations. This change avoids that confusion by putting only compatible records for the same domain name in the tests. cc @kubernetes/sig-cluster-federation
parents 1c9332ab b4ea59e6
......@@ -22,6 +22,7 @@ type (
const (
A = RrsType("A")
AAAA = RrsType("AAAA")
CNAME = RrsType("CNAME")
// TODO: Add other types as required
)
......@@ -84,17 +84,17 @@ func CommonTestResourceRecordSetsDifferentTypes(t *testing.T, zone dnsprovider.Z
defer sets.StartChangeset().Remove(rrset).Apply()
t.Logf("Successfully added resource record set: %v", rrset)
cnameRrset := rrsets.New("alpha.test.com", []string{"cname.test.com"}, 80, rrstype.CNAME)
aaaaRrset := rrsets.New("alpha.test.com", []string{"2001:4860:4860::8888"}, 80, rrstype.AAAA)
// Add the resource with the same name but different type
err := sets.StartChangeset().Add(cnameRrset).Apply()
err := sets.StartChangeset().Add(aaaaRrset).Apply()
if err != nil {
t.Errorf("Failed to add resource record set %v: %v", cnameRrset, err)
t.Errorf("Failed to add resource record set %v: %v", aaaaRrset, err)
}
defer sets.StartChangeset().Remove(cnameRrset).Apply()
defer sets.StartChangeset().Remove(aaaaRrset).Apply()
// Check that both records exist
assertHasRecord(t, sets, cnameRrset)
assertHasRecord(t, sets, aaaaRrset)
assertHasRecord(t, sets, rrset)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment