@@ -7,9 +7,7 @@ use rustls::server::WebPkiClientVerifier;
77use rustls:: { ClientConfig , RootCertStore , ServerConfig } ;
88
99use agent_gateway:: config:: { PolicyConfig , PolicyRule } ;
10- use agent_gateway:: policy:: {
11- self , PolicyDecision , PolicyEngine , RequestContext , TomlPolicyEngine ,
12- } ;
10+ use agent_gateway:: policy:: { self , PolicyDecision , PolicyEngine , RequestContext , TomlPolicyEngine } ;
1311use agent_gateway:: proxy:: Destination ;
1412
1513fn test_policy_config ( ) -> PolicyConfig {
@@ -103,18 +101,12 @@ fn normalize_bracketed_ipv6_with_port() {
103101
104102#[ test]
105103fn normalize_bracketed_ipv6_without_port_defaults_to_443 ( ) {
106- assert_eq ! (
107- policy:: normalize_destination( "[::1]" ) . unwrap( ) ,
108- "[::1]:443"
109- ) ;
104+ assert_eq ! ( policy:: normalize_destination( "[::1]" ) . unwrap( ) , "[::1]:443" ) ;
110105}
111106
112107#[ test]
113108fn normalize_bare_ipv6_defaults_to_443 ( ) {
114- assert_eq ! (
115- policy:: normalize_destination( "::1" ) . unwrap( ) ,
116- "[::1]:443"
117- ) ;
109+ assert_eq ! ( policy:: normalize_destination( "::1" ) . unwrap( ) , "[::1]:443" ) ;
118110 assert_eq ! (
119111 policy:: normalize_destination( "2001:db8::1" ) . unwrap( ) ,
120112 "[2001:db8::1]:443"
@@ -390,7 +382,10 @@ allowed_destinations = ["api.example.com"]
390382 let path = tmpdir. join ( "reject_metrics_bind.toml" ) ;
391383 std:: fs:: write ( & path, toml) . unwrap ( ) ;
392384 let result = agent_gateway:: config:: Config :: load ( & path) ;
393- assert ! ( result. is_err( ) , "metrics_bind should be rejected as an unknown field" ) ;
385+ assert ! (
386+ result. is_err( ) ,
387+ "metrics_bind should be rejected as an unknown field"
388+ ) ;
394389}
395390
396391// ---- Proxy Destination parsing ----
0 commit comments