From e2be34cade9c79ec2429e41597796228b198bcb7 Mon Sep 17 00:00:00 2001 From: houseme Date: Fri, 14 Aug 2026 16:59:21 +0800 Subject: [PATCH] test(rpc): align snapshot lease missing-disk expectation (#6108) Co-authored-by: heihutu --- rustfs/src/storage/rpc/node_service.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rustfs/src/storage/rpc/node_service.rs b/rustfs/src/storage/rpc/node_service.rs index 34bb5f915..d06e0892f 100644 --- a/rustfs/src/storage/rpc/node_service.rs +++ b/rustfs/src/storage/rpc/node_service.rs @@ -2943,7 +2943,7 @@ mod tests { } #[tokio::test] - async fn snapshot_lease_acquire_and_renew_handlers_fail_closed() { + async fn snapshot_lease_acquire_and_renew_handlers_fail_closed_for_missing_disk() { let service = make_server(); let disk = "http://node-a:9000/data/rustfs0".to_string(); @@ -2960,7 +2960,7 @@ mod tests { let acquire = service .acquire_snapshot_lease(acquire) .await - .expect("disabled acquire should return a protocol response") + .expect("missing-disk acquire should return a protocol response") .into_inner(); let mut renew = Request::new(SnapshotLeaseRenewRequest { @@ -2977,14 +2977,14 @@ mod tests { let renew = service .renew_snapshot_lease(renew) .await - .expect("disabled renew should return a protocol response") + .expect("missing-disk renew should return a protocol response") .into_inner(); for response in [acquire, renew] { assert!(!response.success); assert!(response.token.is_empty()); assert_eq!(response.protocol_version, 1); - assert_eq!(response.error, Some(DiskError::UnsupportedDisk.into())); + assert_eq!(response.error, Some(DiskError::other("cannot find disk").into())); } }