Skip to content

Commit

Permalink
Update changes to match latest state of external-dns code
Browse files Browse the repository at this point in the history
  • Loading branch information
tjamet committed Jul 8, 2024
1 parent c85c856 commit 32c756c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions provider/cached_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package provider

import (
"context"
"errors"
"testing"
"time"

Expand All @@ -30,7 +31,7 @@ type testProviderFunc struct {
records func(ctx context.Context) ([]*endpoint.Endpoint, error)
applyChanges func(ctx context.Context, changes *plan.Changes) error
propertyValuesEqual func(name string, previous string, current string) bool
adjustEndpoints func(endpoints []*endpoint.Endpoint) []*endpoint.Endpoint
adjustEndpoints func(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)
getDomainFilter func() endpoint.DomainFilterInterface
}

Expand All @@ -46,7 +47,7 @@ func (p *testProviderFunc) PropertyValuesEqual(name string, previous string, cur
return p.propertyValuesEqual(name, previous, current)
}

func (p *testProviderFunc) AdjustEndpoints(endpoints []*endpoint.Endpoint) []*endpoint.Endpoint {
func (p *testProviderFunc) AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error) {
return p.adjustEndpoints(endpoints)
}

Expand Down Expand Up @@ -75,10 +76,10 @@ func propertyValuesEqualNotCalled(t *testing.T) func(name string, previous strin
}
}

func adjustEndpointsNotCalled(t *testing.T) func(endpoints []*endpoint.Endpoint) []*endpoint.Endpoint {
return func(endpoints []*endpoint.Endpoint) []*endpoint.Endpoint {
func adjustEndpointsNotCalled(t *testing.T) func(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error) {
return func(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error) {
t.Errorf("unexpected call to AdjustEndpoints")
return endpoints
return endpoints, errors.New("unexpected call to AdjustEndpoints")
}
}

Expand Down
2 changes: 1 addition & 1 deletion provider/webhook/api/httpapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (p FakeWebhookProvider) AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]
return endpoints, nil
}

func (p FakeWebhookProvider) GetDomainFilter() endpoint.DomainFilter {
func (p FakeWebhookProvider) GetDomainFilter() endpoint.DomainFilterInterface {
return p.domainFilter
}

Expand Down
2 changes: 1 addition & 1 deletion provider/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func (p WebhookProvider) AdjustEndpoints(e []*endpoint.Endpoint) ([]*endpoint.En
}

// GetDomainFilter make calls to get the serialized version of the domain filter
func (p WebhookProvider) GetDomainFilter() endpoint.DomainFilter {
func (p WebhookProvider) GetDomainFilter() endpoint.DomainFilterInterface {
return p.DomainFilter
}

Expand Down

0 comments on commit 32c756c

Please sign in to comment.