@@ -5,7 +5,7 @@ use torrust_tracker::core::auth::Key;
55use torrust_tracker_test_helpers:: configuration;
66use tracing:: level_filters:: LevelFilter ;
77
8- use crate :: common:: logging:: { self , logs_contains_a_line_with } ;
8+ use crate :: common:: logging:: { self } ;
99use crate :: servers:: api:: connection_info:: { connection_with_invalid_token, connection_with_no_token} ;
1010use crate :: servers:: api:: v1:: asserts:: {
1111 assert_auth_key_utf8, assert_failed_to_delete_key, assert_failed_to_generate_key, assert_failed_to_reload_keys,
@@ -84,8 +84,6 @@ async fn should_not_allow_generating_a_new_auth_key_for_unauthenticated_users()
8484 assert_unauthorized ( response) . await ;
8585
8686 env. stop ( ) . await ;
87-
88- assert ! ( logs_contains_a_line_with( & [ "ERROR" , "tower_http" , "response failed" ] ) ) ;
8987}
9088
9189#[ tokio:: test]
@@ -106,8 +104,6 @@ async fn should_fail_when_the_auth_key_cannot_be_generated() {
106104 assert_failed_to_generate_key ( response) . await ;
107105
108106 env. stop ( ) . await ;
109-
110- assert ! ( logs_contains_a_line_with( & [ "ERROR" , "tower_http" , "response failed" ] ) ) ;
111107}
112108
113109#[ tokio:: test]
@@ -246,8 +242,6 @@ async fn should_fail_when_the_auth_key_cannot_be_deleted() {
246242 assert_failed_to_delete_key ( response) . await ;
247243
248244 env. stop ( ) . await ;
249-
250- assert ! ( logs_contains_a_line_with( & [ "ERROR" , "tower_http" , "response failed" ] ) ) ;
251245}
252246
253247#[ tokio:: test]
@@ -285,8 +279,6 @@ async fn should_not_allow_deleting_an_auth_key_for_unauthenticated_users() {
285279 assert_unauthorized ( response) . await ;
286280
287281 env. stop ( ) . await ;
288-
289- assert ! ( logs_contains_a_line_with( & [ "ERROR" , "tower_http" , "response failed" ] ) ) ;
290282}
291283
292284#[ tokio:: test]
@@ -325,8 +317,6 @@ async fn should_fail_when_keys_cannot_be_reloaded() {
325317 assert_failed_to_reload_keys ( response) . await ;
326318
327319 env. stop ( ) . await ;
328-
329- assert ! ( logs_contains_a_line_with( & [ "ERROR" , "tower_http" , "response failed" ] ) ) ;
330320}
331321
332322#[ tokio:: test]
@@ -354,8 +344,6 @@ async fn should_not_allow_reloading_keys_for_unauthenticated_users() {
354344 assert_unauthorized ( response) . await ;
355345
356346 env. stop ( ) . await ;
357-
358- assert ! ( logs_contains_a_line_with( & [ "ERROR" , "tower_http" , "response failed" ] ) ) ;
359347}
360348
361349mod deprecated_generate_key_endpoint {
@@ -364,7 +352,7 @@ mod deprecated_generate_key_endpoint {
364352 use torrust_tracker_test_helpers:: configuration;
365353 use tracing:: level_filters:: LevelFilter ;
366354
367- use crate :: common:: logging:: { self , logs_contains_a_line_with } ;
355+ use crate :: common:: logging:: { self } ;
368356 use crate :: servers:: api:: connection_info:: { connection_with_invalid_token, connection_with_no_token} ;
369357 use crate :: servers:: api:: v1:: asserts:: {
370358 assert_auth_key_utf8, assert_failed_to_generate_key, assert_invalid_key_duration_param, assert_token_not_valid,
@@ -413,8 +401,6 @@ mod deprecated_generate_key_endpoint {
413401 assert_unauthorized ( response) . await ;
414402
415403 env. stop ( ) . await ;
416-
417- assert ! ( logs_contains_a_line_with( & [ "ERROR" , "tower_http" , "response failed" ] ) ) ;
418404 }
419405
420406 #[ tokio:: test]
@@ -452,7 +438,5 @@ mod deprecated_generate_key_endpoint {
452438 assert_failed_to_generate_key ( response) . await ;
453439
454440 env. stop ( ) . await ;
455-
456- assert ! ( logs_contains_a_line_with( & [ "ERROR" , "tower_http" , "response failed" ] ) ) ;
457441 }
458442}
0 commit comments