Commit b4ea59e6 authored by Madhusudan.C.S's avatar Madhusudan.C.S

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.
parent 1b0bc942
...@@ -22,6 +22,7 @@ type ( ...@@ -22,6 +22,7 @@ type (
const ( const (
A = RrsType("A") A = RrsType("A")
AAAA = RrsType("AAAA")
CNAME = RrsType("CNAME") CNAME = RrsType("CNAME")
// TODO: Add other types as required // TODO: Add other types as required
) )
...@@ -84,17 +84,17 @@ func CommonTestResourceRecordSetsDifferentTypes(t *testing.T, zone dnsprovider.Z ...@@ -84,17 +84,17 @@ func CommonTestResourceRecordSetsDifferentTypes(t *testing.T, zone dnsprovider.Z
defer sets.StartChangeset().Remove(rrset).Apply() defer sets.StartChangeset().Remove(rrset).Apply()
t.Logf("Successfully added resource record set: %v", rrset) 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 // 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 { 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 // Check that both records exist
assertHasRecord(t, sets, cnameRrset) assertHasRecord(t, sets, aaaaRrset)
assertHasRecord(t, sets, rrset) 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