hengfeiyang commented on code in PR #734:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/734#discussion_r3321827694


##########
src/aws/client.rs:
##########
@@ -1153,6 +1169,55 @@ mod tests {
         mock.shutdown().await;
     }
 
+    #[tokio::test]
+    async fn test_single_object_delete_request() {
+        let mock = MockServer::new().await;
+        mock.push_fn(|req| {
+            // A single-object delete must use `DELETE /key`, not the bulk
+            // `POST /?delete` (DeleteObjects) API.
+            assert_eq!(req.method(), Method::DELETE);
+            assert_eq!(req.uri().path(), "/test-bucket/test");
+            assert!(req.uri().query().is_none());
+            Response::builder().status(204).body(String::new()).unwrap()
+        });
+
+        let config = default_headers_config(&mock);
+        let client = S3Client::new(config, 
HttpClient::new(reqwest::Client::new()));
+        let result = client.delete_request(&Path::from("test")).await;
+
+        assert!(result.is_ok());
+        mock.shutdown().await;
+    }
+
+    #[tokio::test]
+    async fn test_disable_bulk_delete_uses_single_object_delete() {

Review Comment:
   i will check it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to