@@ -238,7 +238,9 @@ impl<F: forge_app::FileWriterInfra + 'static> ForgeHttpInfra<F> {
238238 let body_clone = body. clone ( ) ;
239239 let debug_path = debug_path. clone ( ) ;
240240 tokio:: spawn ( async move {
241- let _ = file_writer. append ( & debug_path, body_clone) . await ;
241+ let mut data = body_clone. to_vec ( ) ;
242+ data. push ( b'\n' ) ;
243+ let _ = file_writer. append ( & debug_path, Bytes :: from ( data) ) . await ;
242244 } ) ;
243245 }
244246 }
@@ -402,7 +404,9 @@ mod tests {
402404 let writes = file_writer. get_writes ( ) . await ;
403405 assert_eq ! ( writes. len( ) , 1 , "Should write one file" ) ;
404406 assert_eq ! ( writes[ 0 ] . 0 , debug_path) ;
405- assert_eq ! ( writes[ 0 ] . 1 , body) ;
407+ let mut expected = body. to_vec ( ) ;
408+ expected. push ( b'\n' ) ;
409+ assert_eq ! ( writes[ 0 ] . 1 , Bytes :: from( expected) ) ;
406410 }
407411
408412 #[ tokio:: test]
@@ -423,7 +427,9 @@ mod tests {
423427 let writes = file_writer. get_writes ( ) . await ;
424428 assert_eq ! ( writes. len( ) , 1 , "Should write one file" ) ;
425429 assert_eq ! ( writes[ 0 ] . 0 , debug_path) ;
426- assert_eq ! ( writes[ 0 ] . 1 , body) ;
430+ let mut expected = body. to_vec ( ) ;
431+ expected. push ( b'\n' ) ;
432+ assert_eq ! ( writes[ 0 ] . 1 , Bytes :: from( expected) ) ;
427433 }
428434
429435 #[ tokio:: test]
@@ -470,7 +476,9 @@ mod tests {
470476 "Should write one file for POST when debug_requests is set"
471477 ) ;
472478 assert_eq ! ( writes[ 0 ] . 0 , debug_path) ;
473- assert_eq ! ( writes[ 0 ] . 1 , body) ;
479+ let mut expected = body. to_vec ( ) ;
480+ expected. push ( b'\n' ) ;
481+ assert_eq ! ( writes[ 0 ] . 1 , Bytes :: from( expected) ) ;
474482 }
475483
476484 #[ tokio:: test]
@@ -494,7 +502,9 @@ mod tests {
494502 // Should write to debug_path (no parent dir needed)
495503 assert_eq ! ( writes. len( ) , 1 , "Should write one file" ) ;
496504 assert_eq ! ( writes[ 0 ] . 0 , debug_path) ;
497- assert_eq ! ( writes[ 0 ] . 1 , body) ;
505+ let mut expected = body. to_vec ( ) ;
506+ expected. push ( b'\n' ) ;
507+ assert_eq ! ( writes[ 0 ] . 1 , Bytes :: from( expected) ) ;
498508 }
499509
500510 #[ test]
0 commit comments