@@ -450,10 +450,12 @@ mod tests {
450450 use actix_web:: test:: { call_service, init_service, TestRequest } ;
451451 use actix_web:: App ;
452452 use figment:: providers:: { Format , Toml } ;
453+ use figment:: util:: map;
453454 use figment:: Figment ;
454455 use httpmock:: MockServer ;
455456 use reqwest:: ClientBuilder ;
456457 use rstest:: rstest;
458+ use serial_test:: serial;
457459 use tokio:: sync:: mpsc:: { channel, Receiver } ;
458460 use url:: Url ;
459461
@@ -488,6 +490,14 @@ mod tests {
488490 let figment = Figment :: new ( )
489491 . join ( ( "address" , "127.0.0.1" ) )
490492 . join ( ( "port" , 8000 ) )
493+ . join ( ( "concurrent_download" , 512 ) )
494+ . join ( ( "max_pending_task" , 16384 ) )
495+ . join ( (
496+ "endpoints" ,
497+ map ! [ "sjtug_internal" => "https://github.com/sjtug" ] ,
498+ ) )
499+ . join ( ( "s3.name" , "Placeholder S3" ) )
500+ . join ( ( "s3.endpoint" , server. base_url ( ) ) )
491501 . join ( ( "s3.website_endpoint" , server. base_url ( ) ) )
492502 . join ( ( "s3.bucket" , "bucket" ) )
493503 . join ( ( "direct_stream_size_kb" , 0 ) )
@@ -591,6 +601,7 @@ mod tests {
591601 #[ case( Method :: HEAD , missing_object( ) , StatusCode :: FOUND , | o: & Task , _c: & Config | o. upstream_url( ) ) ]
592602 #[ case( Method :: GET , forbidden_object( ) , StatusCode :: MOVED_PERMANENTLY , | o: & Task , _c: & Config | o. upstream_url( ) ) ]
593603 #[ case( Method :: HEAD , forbidden_object( ) , StatusCode :: MOVED_PERMANENTLY , | o: & Task , _c: & Config | o. upstream_url( ) ) ]
604+ #[ serial( cwd_env) ]
594605 #[ tokio:: test]
595606 async fn test_get_head (
596607 #[ case] method : Method ,
@@ -632,6 +643,7 @@ mod tests {
632643 #[ case( "/pytorch-wheels" , is_no_route_for( "pytorch-wheels" ) ) ]
633644 #[ case( "/pytorch-wheels/?mirror_intel_list" , is_index_for( "pytorch-wheels" ) ) ]
634645 #[ case( "/pytorch-wheels?mirror_intel_list" , is_index_for( "pytorch-wheels" ) ) ]
646+ #[ serial( cwd_env) ]
635647 #[ tokio:: test]
636648 async fn test_index_list_page ( #[ case] url : & str , #[ case] assert_f : impl FnOnce ( & str ) ) {
637649 let ( service, _config, _rx, _server) = make_service ( ) . await ;
@@ -642,6 +654,7 @@ mod tests {
642654 assert_f ( text) ;
643655 }
644656
657+ #[ serial( cwd_env) ]
645658 #[ tokio:: test]
646659 async fn test_url_segment ( ) {
647660 // this case is to test if we could process escaped URL correctly
@@ -664,6 +677,7 @@ mod tests {
664677 ) ;
665678 }
666679
680+ #[ serial( cwd_env) ]
667681 #[ tokio:: test]
668682 async fn test_url_segment_fail ( ) {
669683 // this case is to test if we could process escaped URL correctly
@@ -682,6 +696,7 @@ mod tests {
682696 assert_eq ! ( resp. status( ) , StatusCode :: NOT_FOUND ) ;
683697 }
684698
699+ #[ serial( cwd_env) ]
685700 #[ tokio:: test]
686701 async fn test_url_segment_query ( ) {
687702 // this case is to test if we could process escaped URL correctly
@@ -741,6 +756,7 @@ mod tests {
741756 assert_eq ! ( task. origin, "https://storage.googleapis.com/" ) ;
742757 }
743758
759+ #[ serial( cwd_env) ]
744760 #[ tokio:: test]
745761 async fn test_proxy_head ( ) {
746762 // if an object doesn't exist in s3, we should temporarily redirect users to upstream
0 commit comments