@@ -314,7 +314,10 @@ async fn wait_until_ready(
314314 token : & str ,
315315 timeout : Duration ,
316316) -> Value {
317- let client = reqwest:: Client :: new ( ) ;
317+ let client = reqwest:: Client :: builder ( )
318+ . no_proxy ( )
319+ . build ( )
320+ . expect ( "build reqwest client without proxy" ) ;
318321 let deadline = Instant :: now ( ) + timeout;
319322 loop {
320323 if let Some ( status) = child. try_wait ( ) . expect ( "query child status" ) {
@@ -1284,6 +1287,7 @@ async fn wproj_conf_update_rejects_when_runtime_reload_holds_project_remote_lock
12841287}
12851288
12861289#[ tokio:: test]
1290+ #[ serial]
12871291async fn wproj_conf_update_rolls_back_when_project_check_fails ( ) {
12881292 let bind = reserve_local_addr ( ) ;
12891293 let source_bind = reserve_local_addr ( ) ;
@@ -1328,6 +1332,7 @@ async fn wproj_conf_update_rolls_back_when_project_check_fails() {
13281332}
13291333
13301334#[ tokio:: test]
1335+ #[ serial]
13311336async fn wproj_conf_update_rolls_back_when_sec_dict_load_fails ( ) {
13321337 let bind = reserve_local_addr ( ) ;
13331338 let source_bind = reserve_local_addr ( ) ;
@@ -1367,6 +1372,7 @@ async fn wproj_conf_update_rolls_back_when_sec_dict_load_fails() {
13671372}
13681373
13691374#[ tokio:: test]
1375+ #[ serial]
13701376async fn wproj_conf_update_rolls_back_when_runtime_load_check_fails ( ) {
13711377 let bind = reserve_local_addr ( ) ;
13721378 let source_bind = reserve_local_addr ( ) ;
@@ -1406,6 +1412,7 @@ async fn wproj_conf_update_rolls_back_when_runtime_load_check_fails() {
14061412}
14071413
14081414#[ tokio:: test]
1415+ #[ serial]
14091416async fn wproj_conf_update_uses_work_root_for_sec_dict_lookup ( ) {
14101417 let bind = reserve_local_addr ( ) ;
14111418 let source_bind = reserve_local_addr ( ) ;
@@ -1449,6 +1456,7 @@ async fn wproj_conf_update_uses_work_root_for_sec_dict_lookup() {
14491456}
14501457
14511458#[ tokio:: test]
1459+ #[ serial]
14521460async fn wproj_conf_update_preserves_runtime_rule_mapping_after_success ( ) {
14531461 let bind = reserve_local_addr ( ) ;
14541462 let source_bind = reserve_local_addr ( ) ;
@@ -1487,6 +1495,7 @@ async fn wproj_conf_update_preserves_runtime_rule_mapping_after_success() {
14871495}
14881496
14891497#[ tokio:: test]
1498+ #[ serial]
14901499async fn wproj_conf_update_and_reload_update_flow_work_against_local_project_remote ( ) {
14911500 let bind = reserve_local_addr ( ) ;
14921501 let source_bind = reserve_local_addr ( ) ;
@@ -1581,6 +1590,7 @@ async fn wproj_conf_update_and_reload_update_flow_work_against_local_project_rem
15811590}
15821591
15831592#[ tokio:: test]
1593+ #[ serial]
15841594async fn batch_mode_does_not_expose_admin_http_service ( ) {
15851595 let temp = tempdir ( ) . expect ( "tempdir" ) ;
15861596 let work_root = temp. path ( ) ;
@@ -1600,7 +1610,30 @@ async fn batch_mode_does_not_expose_admin_http_service() {
16001610 . send ( )
16011611 . await ;
16021612
1603- shutdown_child ( & mut child) ;
1613+ let _ = child. kill ( ) ;
1614+ let _ = child. wait ( ) ;
1615+ let output = collect_output ( & mut child) ;
1616+ let log_dump = read_wparse_log ( work_root) ;
1617+
1618+ assert ! (
1619+ !log_dump. contains( "admin api listening on http://" )
1620+ && !log_dump. contains( "admin api listening on https://" ) ,
1621+ "batch mode unexpectedly initialized admin api; child output=\n {}\n log=\n {}" ,
1622+ output,
1623+ log_dump
1624+ ) ;
16041625
1605- assert ! ( resp. is_err( ) , "batch mode should not expose admin HTTP" ) ;
1626+ if let Ok ( resp) = resp {
1627+ if resp. status ( ) . is_success ( ) {
1628+ let status = resp. status ( ) ;
1629+ let body = resp
1630+ . text ( )
1631+ . await
1632+ . unwrap_or_else ( |err| format ! ( "<read body failed: {}>" , err) ) ;
1633+ panic ! (
1634+ "batch mode should not expose a usable admin HTTP endpoint, but got status={} body={}\n child output=\n {}\n log=\n {}" ,
1635+ status, body, output, log_dump
1636+ ) ;
1637+ }
1638+ }
16061639}
0 commit comments