From 87c90c874d761c147fdcbe5071514c8bfdef1a0f Mon Sep 17 00:00:00 2001 From: overtrue Date: Sat, 5 Sep 2026 09:50:34 +0800 Subject: [PATCH] test(odm): match SDK bucket-root listing requests --- rustfs/src/app/bucket_list_through.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rustfs/src/app/bucket_list_through.rs b/rustfs/src/app/bucket_list_through.rs index 3c812b7b3..89e6521bc 100644 --- a/rustfs/src/app/bucket_list_through.rs +++ b/rustfs/src/app/bucket_list_through.rs @@ -572,8 +572,12 @@ mod tests { .next() .expect("request line") .to_string(); - assert!(first_line.starts_with("GET /source-bucket?")); - assert!(first_line.contains("list-type=2")); + // The SDK joins the bucket endpoint with the LIST operation's `/` path. + assert!( + first_line.starts_with("GET /source-bucket/?"), + "expected a path-style bucket-root LIST request, got {first_line:?}" + ); + assert!(first_line.contains("list-type=2"), "expected a ListObjectsV2 query, got {first_line:?}"); requests.push(first_line); let response = format!( "HTTP/1.1 200 OK\r\ncontent-type: application/xml\r\ncontent-length: {}\r\nconnection: close\r\n\r\n{body}",