style: fix rustfmt formatting for CI
This commit is contained in:
@ -477,7 +477,10 @@ async fn test_registration_payload_structure() {
|
||||
// Verify hostname field (optional, may be present or absent)
|
||||
// When present, it should be a non-empty string without dots (short hostname)
|
||||
if let Some(hostname) = payload.get("hostname").and_then(|v| v.as_str()) {
|
||||
assert!(!hostname.is_empty(), "hostname should not be empty when present");
|
||||
assert!(
|
||||
!hostname.is_empty(),
|
||||
"hostname should not be empty when present"
|
||||
);
|
||||
assert!(
|
||||
!hostname.contains('.'),
|
||||
"hostname should be short form (no dots), got: {}",
|
||||
|
||||
@ -203,8 +203,8 @@ fn test_enrollment_hostname_field_serializes() {
|
||||
os_details: serde_json::json!({"name": "Test"}),
|
||||
hostname: Some("host".to_string()),
|
||||
};
|
||||
let json_with = serde_json::to_string(&request_with_hostname)
|
||||
.expect("Should serialize with hostname");
|
||||
let json_with =
|
||||
serde_json::to_string(&request_with_hostname).expect("Should serialize with hostname");
|
||||
assert!(
|
||||
json_with.contains("\"hostname\""),
|
||||
"hostname field should be present in JSON when Some"
|
||||
|
||||
Reference in New Issue
Block a user