@@ -64,8 +64,8 @@ func mockTransport(fields func(rt *transport)) *transport {
6464 ci : & internal.MockCacheInvalidator {},
6565 rs : & internal.MockResponseStorer {},
6666 vrh : & internal.MockValidationResponseHandler {
67- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
68- return resp , err
67+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
68+ return resp , nil
6969 },
7070 },
7171 clock : & internal.MockClock {NowResult : time .Now ()},
@@ -224,9 +224,9 @@ func Test_transport_CacheHit_MustRevalidate_Stale(t *testing.T) {
224224 },
225225 }
226226 rt .vrh = & internal.MockValidationResponseHandler {
227- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
227+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
228228 mockVHCalled = true
229- return resp , err
229+ return resp , nil
230230 },
231231 }
232232 })
@@ -259,9 +259,9 @@ func Test_transport_CacheHit_NoCacheUnqualified(t *testing.T) {
259259 },
260260 }
261261 rt .vrh = & internal.MockValidationResponseHandler {
262- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
262+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
263263 mockVHCalled = true
264- return resp , err
264+ return resp , nil
265265 },
266266 }
267267 })
@@ -539,10 +539,10 @@ func Test_transport_RevalidationPath(t *testing.T) {
539539 },
540540 }
541541 rt .vrh = & internal.MockValidationResponseHandler {
542- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
542+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
543543 mockVHCalled = true
544544 internal .CacheStatusRevalidated .ApplyTo (resp .Header )
545- return resp , err
545+ return resp , nil
546546 },
547547 }
548548 })
@@ -596,9 +596,9 @@ func Test_transport_SWR_NormalPath(t *testing.T) {
596596 rt .clock = & internal.MockClock {NowResult : base .Add (5 * time .Second ), SinceResult : 0 }
597597 rt .siep = & internal.MockStaleIfErrorPolicy {}
598598 rt .vrh = & internal.MockValidationResponseHandler {
599- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
599+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
600600 revalidateCalled <- struct {}{} // Signal that revalidation was called
601- return resp , err
601+ return resp , nil
602602 },
603603 }
604604 rt .swrTimeout = DefaultSWRTimeout
@@ -669,7 +669,7 @@ func Test_transport_SWR_NormalPathAndError(t *testing.T) {
669669 rt .clock = & internal.MockClock {NowResult : base .Add (5 * time .Second ), SinceResult : 0 }
670670 rt .swrTimeout = swrTimeout
671671 rt .vrh = & internal.MockValidationResponseHandler {
672- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
672+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
673673 defer func () { revalidateCalled <- struct {}{} }() // Signal that revalidation was called
674674 return nil , errors .New ("revalidation error" )
675675 },
@@ -736,9 +736,9 @@ func Test_transport_SWR_Timeout(t *testing.T) {
736736 rt .clock = & internal.MockClock {NowResult : base .Add (5 * time .Second ), SinceResult : 0 }
737737 rt .swrTimeout = swrTimeout
738738 rt .vrh = & internal.MockValidationResponseHandler {
739- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
739+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
740740 revalidateCalled <- struct {}{} // Signal that revalidation was called
741- return resp , err
741+ return resp , nil
742742 },
743743 }
744744 rt .upstream = & internal.MockRoundTripper {
0 commit comments