@@ -65,8 +65,8 @@ func mockTransport(fields func(rt *transport)) *transport {
6565 ci : & internal.MockCacheInvalidator {},
6666 rs : & internal.MockResponseStorer {},
6767 vrh : & internal.MockValidationResponseHandler {
68- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
69- return resp , err
68+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
69+ return resp , nil
7070 },
7171 },
7272 clock : & internal.MockClock {NowResult : time .Now ()},
@@ -225,9 +225,9 @@ func Test_transport_CacheHit_MustRevalidate_Stale(t *testing.T) {
225225 },
226226 }
227227 rt .vrh = & internal.MockValidationResponseHandler {
228- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
228+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
229229 mockVHCalled = true
230- return resp , err
230+ return resp , nil
231231 },
232232 }
233233 })
@@ -260,9 +260,9 @@ func Test_transport_CacheHit_NoCacheUnqualified(t *testing.T) {
260260 },
261261 }
262262 rt .vrh = & internal.MockValidationResponseHandler {
263- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
263+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
264264 mockVHCalled = true
265- return resp , err
265+ return resp , nil
266266 },
267267 }
268268 })
@@ -540,10 +540,10 @@ func Test_transport_RevalidationPath(t *testing.T) {
540540 },
541541 }
542542 rt .vrh = & internal.MockValidationResponseHandler {
543- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
543+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
544544 mockVHCalled = true
545545 internal .CacheStatusRevalidated .ApplyTo (resp .Header )
546- return resp , err
546+ return resp , nil
547547 },
548548 }
549549 })
@@ -597,9 +597,9 @@ func Test_transport_SWR_NormalPath(t *testing.T) {
597597 rt .clock = & internal.MockClock {NowResult : base .Add (5 * time .Second ), SinceResult : 0 }
598598 rt .siep = & internal.MockStaleIfErrorPolicy {}
599599 rt .vrh = & internal.MockValidationResponseHandler {
600- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
600+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
601601 revalidateCalled <- struct {}{} // Signal that revalidation was called
602- return resp , err
602+ return resp , nil
603603 },
604604 }
605605 rt .swrTimeout = DefaultSWRTimeout
@@ -670,7 +670,7 @@ func Test_transport_SWR_NormalPathAndError(t *testing.T) {
670670 rt .clock = & internal.MockClock {NowResult : base .Add (5 * time .Second ), SinceResult : 0 }
671671 rt .swrTimeout = swrTimeout
672672 rt .vrh = & internal.MockValidationResponseHandler {
673- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
673+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
674674 defer func () { revalidateCalled <- struct {}{} }() // Signal that revalidation was called
675675 return nil , errors .New ("revalidation error" )
676676 },
@@ -737,9 +737,9 @@ func Test_transport_SWR_Timeout(t *testing.T) {
737737 rt .clock = & internal.MockClock {NowResult : base .Add (5 * time .Second ), SinceResult : 0 }
738738 rt .swrTimeout = swrTimeout
739739 rt .vrh = & internal.MockValidationResponseHandler {
740- HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response , err error ) (* http.Response , error ) {
740+ HandleValidationResponseFunc : func (ctx internal.RevalidationContext , req * http.Request , resp * http.Response ) (* http.Response , error ) {
741741 revalidateCalled <- struct {}{} // Signal that revalidation was called
742- return resp , err
742+ return resp , nil
743743 },
744744 }
745745 rt .upstream = & internal.MockRoundTripper {
0 commit comments