@@ -414,28 +414,6 @@ async fn wait_for_secret_removal(secret: &str, timeout: Duration) -> Result<(),
414414 }
415415}
416416
417- async fn wait_for_proxy_connect (
418- proxy : & SupportContainer ,
419- allowed_ip : & str ,
420- timeout : Duration ,
421- ) -> Result < String , String > {
422- let expected = format ! ( "CONNECT {allowed_ip}:{UPSTREAM_PORT} auth=ok" ) ;
423- let start = std:: time:: Instant :: now ( ) ;
424- loop {
425- let logs = proxy. logs ( ) ?;
426- if logs. contains ( & expected) {
427- return Ok ( logs) ;
428- }
429- if start. elapsed ( ) > timeout {
430- return Err ( format ! (
431- "proxy did not record '{expected}' within {}s. Logs:\n {logs}" ,
432- timeout. as_secs( )
433- ) ) ;
434- }
435- tokio:: time:: sleep ( Duration :: from_millis ( 100 ) ) . await ;
436- }
437- }
438-
439417/// Assert the workload's results and the proxy's own record of what it saw.
440418///
441419/// `output` is the sandbox's stdout; `proxy_logs` is the fake proxy's log,
@@ -582,10 +560,12 @@ async fn podman_corporate_proxy_routes_approved_tls_egress() {
582560 . await
583561 . expect ( "create sandbox behind the corporate proxy" ) ;
584562
585- let proxy_logs = wait_for_proxy_connect ( & proxy, & allowed_ip, Duration :: from_secs ( 10 ) )
586- . await
587- . expect ( "wait for fake proxy CONNECT log" ) ;
588- assert_proxied_egress ( & sandbox. create_output , & proxy_logs, & allowed_ip, & denied_ip) ;
563+ assert_proxied_egress (
564+ & sandbox. create_output ,
565+ & proxy. logs ( ) . expect ( "read fake proxy logs" ) ,
566+ & allowed_ip,
567+ & denied_ip,
568+ ) ;
589569
590570 // ── Secret lifecycle ──────────────────────────────────────────────
591571 let secrets_live = proxy_auth_secret_names ( ) . expect ( "list proxy-auth secrets while sandbox up" ) ;
0 commit comments