@@ -391,21 +391,21 @@ mod tests {
391391
392392 #[ test]
393393 fn udp_route_rejects_oversized_source_limits ( ) {
394- let mut route = route ( ) ;
395- route . max_sessions_per_source = super :: MAX_UDP_MAX_SESSIONS_PER_SOURCE + 1 ;
394+ let mut config = route ( ) ;
395+ config . max_sessions_per_source = super :: MAX_UDP_MAX_SESSIONS_PER_SOURCE + 1 ;
396396 assert ! ( matches!(
397- route . validate( ) ,
397+ config . validate( ) ,
398398 Err ( ConfigError :: InvalidUdpProxyPolicy {
399399 field: "udp.routes.max_sessions_per_source" ,
400400 ..
401401 } )
402402 ) ) ;
403403
404- let mut route = route ( ) ;
405- route . max_responses_per_source_per_second =
404+ let mut config = route ( ) ;
405+ config . max_responses_per_source_per_second =
406406 super :: MAX_UDP_MAX_RESPONSES_PER_SOURCE_PER_SECOND + 1 ;
407407 assert ! ( matches!(
408- route . validate( ) ,
408+ config . validate( ) ,
409409 Err ( ConfigError :: InvalidUdpProxyPolicy {
410410 field: "udp.routes.max_responses_per_source_per_second" ,
411411 ..
@@ -415,29 +415,29 @@ mod tests {
415415
416416 #[ test]
417417 fn udp_route_rejects_invalid_passive_health_policy ( ) {
418- let mut route = route ( ) ;
419- route . passive_health_failures = 0 ;
418+ let mut config = route ( ) ;
419+ config . passive_health_failures = 0 ;
420420 assert ! ( matches!(
421- route . validate( ) ,
421+ config . validate( ) ,
422422 Err ( ConfigError :: InvalidUdpProxyPolicy {
423423 field: "udp.routes.passive_health_failures" ,
424424 ..
425425 } )
426426 ) ) ;
427427
428- let mut route = route ( ) ;
429- route . passive_health_ejection_secs = 0 ;
428+ let mut config = route ( ) ;
429+ config . passive_health_ejection_secs = 0 ;
430430 assert ! ( matches!(
431- route . validate( ) ,
432- Err ( ConfigError :: InvalidConfig { field, .. } )
431+ config . validate( ) ,
432+ Err ( ConfigError :: InvalidProxyTimeout { field } )
433433 if field == "udp.routes.passive_health_ejection_secs"
434434 ) ) ;
435435
436- let mut route = route ( ) ;
437- route . passive_health_enabled = false ;
438- route . passive_health_failures = 0 ;
439- route . passive_health_ejection_secs = 0 ;
440- route . validate ( ) . unwrap ( ) ;
436+ let mut config = route ( ) ;
437+ config . passive_health_enabled = false ;
438+ config . passive_health_failures = 0 ;
439+ config . passive_health_ejection_secs = 0 ;
440+ config . validate ( ) . unwrap ( ) ;
441441 }
442442
443443 #[ test]
0 commit comments