@@ -44,7 +44,7 @@ func TestGate_BlocksWhenNotReady(t *testing.T) {
4444 interceptor := gate .UnaryServerInterceptor ()
4545 _ , err := interceptor (context .Background (), nil , & grpc.UnaryServerInfo {
4646 FullMethod : "/authzed.api.v1.PermissionsService/CheckPermission" ,
47- }, func (ctx context.Context , req interface {} ) (interface {} , error ) {
47+ }, func (ctx context.Context , req any ) (any , error ) {
4848 t .Fatal ("handler should not be called when not ready" )
4949 return nil , nil
5050 })
@@ -65,7 +65,7 @@ func TestGate_AllowsWhenReady(t *testing.T) {
6565 interceptor := gate .UnaryServerInterceptor ()
6666 _ , err := interceptor (context .Background (), nil , & grpc.UnaryServerInfo {
6767 FullMethod : "/authzed.api.v1.PermissionsService/CheckPermission" ,
68- }, func (ctx context.Context , req interface {} ) (interface {} , error ) {
68+ }, func (ctx context.Context , req any ) (any , error ) {
6969 handlerCalled = true
7070 return "response" , nil
7171 })
@@ -85,7 +85,7 @@ func TestGate_BypassesHealthCheck(t *testing.T) {
8585 interceptor := gate .UnaryServerInterceptor ()
8686 _ , err := interceptor (context .Background (), nil , & grpc.UnaryServerInfo {
8787 FullMethod : "/grpc.health.v1.Health/Check" ,
88- }, func (ctx context.Context , req interface {} ) (interface {} , error ) {
88+ }, func (ctx context.Context , req any ) (any , error ) {
8989 handlerCalled = true
9090 return "ok" , nil
9191 })
@@ -107,7 +107,7 @@ func TestGate_BypassesHealthWatch(t *testing.T) {
107107 interceptor := gate .UnaryServerInterceptor ()
108108 _ , err := interceptor (context .Background (), nil , & grpc.UnaryServerInfo {
109109 FullMethod : "/grpc.health.v1.Health/Watch" ,
110- }, func (ctx context.Context , req interface {} ) (interface {} , error ) {
110+ }, func (ctx context.Context , req any ) (any , error ) {
111111 handlerCalled = true
112112 return "ok" , nil
113113 })
@@ -122,7 +122,7 @@ func TestGate_CachesReadyState(t *testing.T) {
122122
123123 interceptor := gate .UnaryServerInterceptor ()
124124 info := & grpc.UnaryServerInfo {FullMethod : "/test/Method" }
125- handler := func (ctx context.Context , req interface {} ) (interface {} , error ) {
125+ handler := func (ctx context.Context , req any ) (any , error ) {
126126 return nil , nil
127127 }
128128
@@ -152,7 +152,7 @@ func TestGate_CacheExpires(t *testing.T) {
152152 interceptor := gate .UnaryServerInterceptor ()
153153 _ , _ = interceptor (context .Background (), nil , & grpc.UnaryServerInfo {
154154 FullMethod : "/test/Method" ,
155- }, func (ctx context.Context , req interface {} ) (interface {} , error ) {
155+ }, func (ctx context.Context , req any ) (any , error ) {
156156 return nil , nil
157157 })
158158
@@ -167,7 +167,7 @@ func TestGate_SingleflightPreventsThunderingHerd(t *testing.T) {
167167
168168 interceptor := gate .UnaryServerInterceptor ()
169169 info := & grpc.UnaryServerInfo {FullMethod : "/test/Method" }
170- handler := func (ctx context.Context , req interface {} ) (interface {} , error ) {
170+ handler := func (ctx context.Context , req any ) (any , error ) {
171171 return nil , nil
172172 }
173173
@@ -196,7 +196,7 @@ func TestGate_HandlesCheckerError(t *testing.T) {
196196 interceptor := gate .UnaryServerInterceptor ()
197197 _ , err := interceptor (context .Background (), nil , & grpc.UnaryServerInfo {
198198 FullMethod : "/test/Method" ,
199- }, func (ctx context.Context , req interface {} ) (interface {} , error ) {
199+ }, func (ctx context.Context , req any ) (any , error ) {
200200 t .Fatal ("handler should not be called on error" )
201201 return nil , nil
202202 })
@@ -218,7 +218,7 @@ func TestGate_StreamInterceptorBlocksWhenNotReady(t *testing.T) {
218218 interceptor := gate .StreamServerInterceptor ()
219219 err := interceptor (nil , & mockServerStream {}, & grpc.StreamServerInfo {
220220 FullMethod : "/authzed.api.v1.WatchService/Watch" ,
221- }, func (srv interface {} , stream grpc.ServerStream ) error {
221+ }, func (srv any , stream grpc.ServerStream ) error {
222222 t .Fatal ("handler should not be called when not ready" )
223223 return nil
224224 })
@@ -237,7 +237,7 @@ func TestGate_StreamInterceptorAllowsWhenReady(t *testing.T) {
237237 interceptor := gate .StreamServerInterceptor ()
238238 err := interceptor (nil , & mockServerStream {}, & grpc.StreamServerInfo {
239239 FullMethod : "/authzed.api.v1.WatchService/Watch" ,
240- }, func (srv interface {} , stream grpc.ServerStream ) error {
240+ }, func (srv any , stream grpc.ServerStream ) error {
241241 handlerCalled = true
242242 return nil
243243 })
@@ -266,7 +266,7 @@ func TestGate_NilCheckerPassesThrough(t *testing.T) {
266266 interceptor := gate .UnaryServerInterceptor ()
267267 _ , err := interceptor (context .Background (), nil , & grpc.UnaryServerInfo {
268268 FullMethod : "/authzed.api.v1.PermissionsService/CheckPermission" ,
269- }, func (ctx context.Context , req interface {} ) (interface {} , error ) {
269+ }, func (ctx context.Context , req any ) (any , error ) {
270270 handlerCalled = true
271271 return "response" , nil
272272 })
@@ -281,7 +281,7 @@ func TestGate_ErrorDoesNotCache(t *testing.T) {
281281
282282 interceptor := gate .UnaryServerInterceptor ()
283283 info := & grpc.UnaryServerInfo {FullMethod : "/test/Method" }
284- handler := func (ctx context.Context , req interface {} ) (interface {} , error ) {
284+ handler := func (ctx context.Context , req any ) (any , error ) {
285285 return nil , nil
286286 }
287287
@@ -296,7 +296,7 @@ func TestGate_ErrorDoesNotCache(t *testing.T) {
296296
297297 // Second call should retry (not use cached error)
298298 handlerCalled := false
299- _ , err = interceptor (context .Background (), nil , info , func (ctx context.Context , req interface {} ) (interface {} , error ) {
299+ _ , err = interceptor (context .Background (), nil , info , func (ctx context.Context , req any ) (any , error ) {
300300 handlerCalled = true
301301 return "ok" , nil
302302 })
@@ -314,7 +314,7 @@ func TestGate_NegativeCacheReducesChecks(t *testing.T) {
314314
315315 interceptor := gate .UnaryServerInterceptor ()
316316 info := & grpc.UnaryServerInfo {FullMethod : "/test/Method" }
317- handler := func (ctx context.Context , req interface {} ) (interface {} , error ) {
317+ handler := func (ctx context.Context , req any ) (any , error ) {
318318 return nil , nil
319319 }
320320
@@ -365,7 +365,7 @@ func TestGate_ErrorMessageContextAware(t *testing.T) {
365365 interceptor := gate .UnaryServerInterceptor ()
366366 _ , err := interceptor (context .Background (), nil , & grpc.UnaryServerInfo {
367367 FullMethod : "/test/Method" ,
368- }, func (ctx context.Context , req interface {} ) (interface {} , error ) {
368+ }, func (ctx context.Context , req any ) (any , error ) {
369369 return nil , nil
370370 })
371371
0 commit comments