diff --git a/endpoint/endpoint.go b/endpoint/endpoint.go index 02607316a..e9d413261 100644 --- a/endpoint/endpoint.go +++ b/endpoint/endpoint.go @@ -295,7 +295,8 @@ func FilterEndpointsByOwnerID(ownerID string, eps []*Endpoint) []*Endpoint { filtered := []*Endpoint{} visited := make(map[EndpointKey]bool) // Initialize the visited map for _, ep := range eps { - key := EndpointKey{DNSName: ep.DNSName, RecordType: ep.RecordType, SetIdentifier: ep.SetIdentifier} + //key := EndpointKey{DNSName: ep.DNSName, RecordType: ep.RecordType, SetIdentifier: ep.SetIdentifier} --< this line passes the unit tests but I think it's wrong + key := ep.Key() // This function should be the primary key for endpoints but it's only considering DNSName, RecordType & SetIdentifier. if visited[key] { //Do not contain duplicated endpoints log.Debugf(`Already loaded endpoint %v `, ep) continue