mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
Fix NS related provider test
This commit is contained in:
parent
904d8e4c87
commit
ede9767c78
@ -257,9 +257,9 @@ func AssertActions(t *testing.T, provider *CloudFlareProvider, endpoints []*endp
|
||||
|
||||
changes := plan.Calculate().Changes
|
||||
|
||||
// Records other than A and CNAME are not supported by planner, just create them
|
||||
// Records other than A, CNAME and NS are not supported by planner, just create them
|
||||
for _, endpoint := range endpoints {
|
||||
if endpoint.RecordType != "A" && endpoint.RecordType != "CNAME" {
|
||||
if endpoint.RecordType != "A" && endpoint.RecordType != "CNAME" && endpoint.RecordType != "NS" {
|
||||
changes.Create = append(changes.Create, endpoint)
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ func TestOvhZoneRecords(t *testing.T) {
|
||||
zones, records, err := provider.zonesRecords(context.TODO())
|
||||
assert.NoError(err)
|
||||
assert.ElementsMatch(zones, []string{"example.org"})
|
||||
assert.ElementsMatch(records, []ovhRecord{{ID: 42, Zone: "example.org", ovhRecordFields: ovhRecordFields{SubDomain: "ovh", FieldType: "A", TTL: 10, Target: "203.0.113.42"}}})
|
||||
assert.ElementsMatch(records, []ovhRecord{{ID: 42, Zone: "example.org", ovhRecordFields: ovhRecordFields{SubDomain: "ovh", FieldType: "A", TTL: 10, Target: "203.0.113.42"}}, {ID: 24, Zone: "example.org", ovhRecordFields: ovhRecordFields{SubDomain: "ovh", FieldType: "NS", TTL: 10, Target: "203.0.113.42"}}})
|
||||
client.AssertExpectations(t)
|
||||
|
||||
// Error on getting zones list
|
||||
|
@ -71,7 +71,7 @@ func TestRcodeZeroProvider_Records(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("should not fail, %s", err)
|
||||
}
|
||||
require.Equal(t, 6, len(endpoints))
|
||||
require.Equal(t, 10, len(endpoints))
|
||||
|
||||
mockRRSetService.TestErrorReturned = true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user