fix(tests): resolve all clippy warnings for CI compliance
- Remove needless borrows on format!() in set_body_string() calls (needless_borrows_for_generic_args) - Replace assert!(false, ...) with collected assertion (assertions_on_constants + never_loop) - Use direct Method::POST comparison instead of to_string() (cmp_owned) - Simplify negated equality to != operator (nonminimal_bool) CI pipeline now passes with -D warnings enabled
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
|
||||
use linux_patch_api::enroll::client::EnrollmentClient;
|
||||
use serial_test::serial;
|
||||
use wiremock::http::Method;
|
||||
use wiremock::{
|
||||
matchers::{method, path, path_regex},
|
||||
Mock, MockServer, ResponseTemplate,
|
||||
@ -417,7 +418,7 @@ async fn test_registration_payload_structure() {
|
||||
let requests = server.received_requests().await.unwrap();
|
||||
let post_request = requests
|
||||
.iter()
|
||||
.find(|r| r.method.to_string() == "POST")
|
||||
.find(|r| r.method == Method::POST)
|
||||
.expect("Should have received a POST request");
|
||||
|
||||
let body_str = std::str::from_utf8(&post_request.body).expect("Body should be valid UTF-8");
|
||||
|
||||
Reference in New Issue
Block a user