@@ -1470,8 +1470,7 @@ mod axum_http_tracker_server {
14701470 start_ipv6_http_tracker, start_public_http_tracker,
14711471 } ;
14721472
1473- //#[tokio::test]
1474- #[ allow( dead_code) ]
1473+ #[ tokio:: test]
14751474 async fn should_respond_if_only_the_mandatory_fields_are_provided ( ) {
14761475 let http_tracker_server = start_default_http_tracker ( Version :: Axum ) . await ;
14771476
@@ -1742,8 +1741,7 @@ mod axum_http_tracker_server {
17421741 }
17431742 }
17441743
1745- //#[tokio::test]
1746- #[ allow( dead_code) ]
1744+ #[ tokio:: test]
17471745 async fn should_return_no_peers_if_the_announced_peer_is_the_first_one ( ) {
17481746 let http_tracker_server = start_public_http_tracker ( Version :: Axum ) . await ;
17491747
@@ -1768,8 +1766,7 @@ mod axum_http_tracker_server {
17681766 . await ;
17691767 }
17701768
1771- //#[tokio::test]
1772- #[ allow( dead_code) ]
1769+ #[ tokio:: test]
17731770 async fn should_return_the_list_of_previously_announced_peers ( ) {
17741771 let http_tracker_server = start_public_http_tracker ( Version :: Axum ) . await ;
17751772
@@ -1793,7 +1790,7 @@ mod axum_http_tracker_server {
17931790 )
17941791 . await ;
17951792
1796- // It should only contain teh previously announced peer
1793+ // It should only contain the previously announced peer
17971794 assert_announce_response (
17981795 response,
17991796 & Announce {
@@ -1807,8 +1804,7 @@ mod axum_http_tracker_server {
18071804 . await ;
18081805 }
18091806
1810- //#[tokio::test]
1811- #[ allow( dead_code) ]
1807+ #[ tokio:: test]
18121808 async fn should_consider_two_peers_to_be_the_same_when_they_have_the_same_peer_id_even_if_the_ip_is_different ( ) {
18131809 let http_tracker_server = start_public_http_tracker ( Version :: Axum ) . await ;
18141810
@@ -1872,8 +1868,7 @@ mod axum_http_tracker_server {
18721868 assert_compact_announce_response ( response, & expected_response) . await ;
18731869 }
18741870
1875- //#[tokio::test]
1876- #[ allow( dead_code) ]
1871+ #[ tokio:: test]
18771872 async fn should_not_return_the_compact_response_by_default ( ) {
18781873 // code-review: the HTTP tracker does not return the compact response by default if the "compact"
18791874 // param is not provided in the announce URL. The BEP 23 suggest to do so.
@@ -1912,8 +1907,7 @@ mod axum_http_tracker_server {
19121907 compact_announce. is_ok ( )
19131908 }
19141909
1915- //#[tokio::test]
1916- #[ allow( dead_code) ]
1910+ #[ tokio:: test]
19171911 async fn should_increase_the_number_of_tcp4_connections_handled_in_statistics ( ) {
19181912 let http_tracker_server = start_public_http_tracker ( Version :: Axum ) . await ;
19191913
@@ -1926,8 +1920,7 @@ mod axum_http_tracker_server {
19261920 assert_eq ! ( stats. tcp4_connections_handled, 1 ) ;
19271921 }
19281922
1929- //#[tokio::test]
1930- #[ allow( dead_code) ]
1923+ #[ tokio:: test]
19311924 async fn should_increase_the_number_of_tcp6_connections_handled_in_statistics ( ) {
19321925 let http_tracker_server = start_ipv6_http_tracker ( Version :: Axum ) . await ;
19331926
@@ -1960,8 +1953,7 @@ mod axum_http_tracker_server {
19601953 assert_eq ! ( stats. tcp6_connections_handled, 0 ) ;
19611954 }
19621955
1963- //#[tokio::test]
1964- #[ allow( dead_code) ]
1956+ #[ tokio:: test]
19651957 async fn should_increase_the_number_of_tcp4_announce_requests_handled_in_statistics ( ) {
19661958 let http_tracker_server = start_public_http_tracker ( Version :: Axum ) . await ;
19671959
@@ -1974,8 +1966,7 @@ mod axum_http_tracker_server {
19741966 assert_eq ! ( stats. tcp4_announces_handled, 1 ) ;
19751967 }
19761968
1977- //#[tokio::test]
1978- #[ allow( dead_code) ]
1969+ #[ tokio:: test]
19791970 async fn should_increase_the_number_of_tcp6_announce_requests_handled_in_statistics ( ) {
19801971 let http_tracker_server = start_ipv6_http_tracker ( Version :: Axum ) . await ;
19811972
@@ -2032,8 +2023,7 @@ mod axum_http_tracker_server {
20322023 assert_ne ! ( peer_addr. ip( ) , IpAddr :: from_str( "2.2.2.2" ) . unwrap( ) ) ;
20332024 }
20342025
2035- //#[tokio::test]
2036- #[ allow( dead_code) ]
2026+ #[ tokio:: test]
20372027 async fn when_the_client_ip_is_a_loopback_ipv4_it_should_assign_to_the_peer_ip_the_external_ip_in_the_tracker_configuration (
20382028 ) {
20392029 /* We assume that both the client and tracker share the same public IP.
@@ -2065,8 +2055,7 @@ mod axum_http_tracker_server {
20652055 assert_ne ! ( peer_addr. ip( ) , IpAddr :: from_str( "2.2.2.2" ) . unwrap( ) ) ;
20662056 }
20672057
2068- //#[tokio::test]
2069- #[ allow( dead_code) ]
2058+ #[ tokio:: test]
20702059 async fn when_the_client_ip_is_a_loopback_ipv6_it_should_assign_to_the_peer_ip_the_external_ip_in_the_tracker_configuration (
20712060 ) {
20722061 /* We assume that both the client and tracker share the same public IP.
@@ -2101,8 +2090,7 @@ mod axum_http_tracker_server {
21012090 assert_ne ! ( peer_addr. ip( ) , IpAddr :: from_str( "2.2.2.2" ) . unwrap( ) ) ;
21022091 }
21032092
2104- //#[tokio::test]
2105- #[ allow( dead_code) ]
2093+ #[ tokio:: test]
21062094 async fn when_the_tracker_is_behind_a_reverse_proxy_it_should_assign_to_the_peer_ip_the_ip_in_the_x_forwarded_for_http_header (
21072095 ) {
21082096 /*
0 commit comments