@@ -1309,24 +1309,24 @@ mod tests {
13091309 }
13101310
13111311 #[ test]
1312- fn handle_proxy_replaces_invalid_request_header_with_matching_response_cookie ( ) {
1312+ fn handle_proxy_replaces_invalid_ec_request_header_with_matching_response_cookie ( ) {
13131313 let settings = create_test_settings ( ) ;
13141314 let routes = vec ! [ (
13151315 Method :: GET ,
1316- "/integrations/test/synthetic " ,
1316+ "/integrations/test/ec " ,
13171317 (
1318- Arc :: new( SyntheticIdTestProxy ) as Arc <dyn IntegrationProxy >,
1319- "synthetic_id_test " ,
1318+ Arc :: new( EcTestProxy ) as Arc <dyn IntegrationProxy >,
1319+ "ec_test " ,
13201320 ) ,
13211321 ) ] ;
13221322 let registry = IntegrationRegistry :: from_routes ( routes) ;
13231323
1324- let mut req = Request :: get ( "https://test-publisher.com/integrations/test/synthetic " ) ;
1325- req. set_header ( HEADER_X_SYNTHETIC_ID , "evil;injected" ) ;
1324+ let mut req = Request :: get ( "https://test-publisher.com/integrations/test/ec " ) ;
1325+ req. set_header ( HEADER_X_TS_EC , "evil;injected" ) ;
13261326
13271327 let result = futures:: executor:: block_on ( registry. handle_proxy (
13281328 & Method :: GET ,
1329- "/integrations/test/synthetic " ,
1329+ "/integrations/test/ec " ,
13301330 & settings,
13311331 & noop_services ( ) ,
13321332 req,
@@ -1335,8 +1335,8 @@ mod tests {
13351335
13361336 let response = result. expect ( "handler should succeed" ) ;
13371337 let response_header = response
1338- . get_header ( HEADER_X_SYNTHETIC_ID )
1339- . expect ( "response should have x-synthetic-id header" )
1338+ . get_header ( HEADER_X_TS_EC )
1339+ . expect ( "response should have x-ts-ec header" )
13401340 . to_str ( )
13411341 . expect ( "header should be valid UTF-8" )
13421342 . to_string ( ) ;
@@ -1346,17 +1346,17 @@ mod tests {
13461346 . to_str ( )
13471347 . expect ( "header should be valid UTF-8" ) ;
13481348 let cookie_value = cookie_header
1349- . strip_prefix ( & format ! ( "{}=" , COOKIE_SYNTHETIC_ID ) )
1349+ . strip_prefix ( & format ! ( "{}=" , COOKIE_TS_EC ) )
13501350 . and_then ( |s| s. split_once ( ';' ) . map ( |( value, _) | value) )
1351- . expect ( "should contain the synthetic_id cookie value" ) ;
1351+ . expect ( "should contain the ts-ec cookie value" ) ;
13521352
13531353 assert_ne ! (
13541354 response_header, "evil;injected" ,
13551355 "should not reflect the tampered request header"
13561356 ) ;
13571357 assert_eq ! (
13581358 response_header, cookie_value,
1359- "response header and cookie should carry the same effective synthetic ID"
1359+ "response header and cookie should carry the same effective EC ID"
13601360 ) ;
13611361 }
13621362
0 commit comments