@@ -17,6 +17,7 @@ package provider
17
17
18
18
import (
19
19
"context"
20
+ "errors"
20
21
"testing"
21
22
"time"
22
23
@@ -30,7 +31,7 @@ type testProviderFunc struct {
30
31
records func (ctx context.Context ) ([]* endpoint.Endpoint , error )
31
32
applyChanges func (ctx context.Context , changes * plan.Changes ) error
32
33
propertyValuesEqual func (name string , previous string , current string ) bool
33
- adjustEndpoints func (endpoints []* endpoint.Endpoint ) []* endpoint.Endpoint
34
+ adjustEndpoints func (endpoints []* endpoint.Endpoint ) ( []* endpoint.Endpoint , error )
34
35
getDomainFilter func () endpoint.DomainFilterInterface
35
36
}
36
37
@@ -46,7 +47,7 @@ func (p *testProviderFunc) PropertyValuesEqual(name string, previous string, cur
46
47
return p .propertyValuesEqual (name , previous , current )
47
48
}
48
49
49
- func (p * testProviderFunc ) AdjustEndpoints (endpoints []* endpoint.Endpoint ) []* endpoint.Endpoint {
50
+ func (p * testProviderFunc ) AdjustEndpoints (endpoints []* endpoint.Endpoint ) ( []* endpoint.Endpoint , error ) {
50
51
return p .adjustEndpoints (endpoints )
51
52
}
52
53
@@ -75,10 +76,10 @@ func propertyValuesEqualNotCalled(t *testing.T) func(name string, previous strin
75
76
}
76
77
}
77
78
78
- func adjustEndpointsNotCalled (t * testing.T ) func (endpoints []* endpoint.Endpoint ) []* endpoint.Endpoint {
79
- return func (endpoints []* endpoint.Endpoint ) []* endpoint.Endpoint {
79
+ func adjustEndpointsNotCalled (t * testing.T ) func (endpoints []* endpoint.Endpoint ) ( []* endpoint.Endpoint , error ) {
80
+ return func (endpoints []* endpoint.Endpoint ) ( []* endpoint.Endpoint , error ) {
80
81
t .Errorf ("unexpected call to AdjustEndpoints" )
81
- return endpoints
82
+ return endpoints , errors . New ( "unexpected call to AdjustEndpoints" )
82
83
}
83
84
}
84
85
0 commit comments