Skip to content

Commit b2a452d

Browse files
committed
line wraps
1 parent 3c176f1 commit b2a452d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

nexus/src/app/device_auth.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ impl super::Nexus {
126126
if let (Some(requested), Some(max)) = (requested_ttl, silo_max_ttl) {
127127
if requested > max.0.into() {
128128
return Err(Error::invalid_request(&format!(
129-
"Requested TTL {} seconds exceeds maximum allowed TTL {} seconds for this silo",
129+
"Requested TTL {} seconds exceeds maximum \
130+
allowed TTL for this silo of {} seconds",
130131
requested, max
131132
)));
132133
}

nexus/tests/integration_tests/device_auth.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,8 @@ async fn test_device_token_request_ttl_invalid(
465465
serde_json::from_slice(&auth_response.body).unwrap();
466466
assert_eq!(
467467
error_body.get("message").unwrap().to_string(),
468-
"\"unable to parse URL-encoded body: ttl_seconds: invalid value: integer `0`, expected a nonzero u32\""
468+
"\"unable to parse URL-encoded body: ttl_seconds: \
469+
invalid value: integer `0`, expected a nonzero u32\""
469470
);
470471

471472
let auth_response = NexusRequest::new(
@@ -486,7 +487,8 @@ async fn test_device_token_request_ttl_invalid(
486487
serde_json::from_slice(&auth_response.body).unwrap();
487488
assert_eq!(
488489
error_body.get("message").unwrap().to_string(),
489-
"\"unable to parse URL-encoded body: ttl_seconds: invalid digit found in string\""
490+
"\"unable to parse URL-encoded body: ttl_seconds: \
491+
invalid digit found in string\""
490492
);
491493
}
492494

@@ -532,7 +534,8 @@ async fn test_device_token_request_ttl(cptestctx: &ControlPlaneTestContext) {
532534
assert_eq!(confirm_error.error_code, Some("InvalidRequest".to_string()));
533535
assert_eq!(
534536
confirm_error.message,
535-
"Requested TTL 20 seconds exceeds maximum allowed TTL 10 seconds for this silo"
537+
"Requested TTL 20 seconds exceeds maximum allowed TTL \
538+
for this silo of 10 seconds"
536539
);
537540

538541
// Request TTL below the max should succeed and be used

0 commit comments

Comments
 (0)