refactored all functions (#145)

* refactored stat_object

refactored select_object_content

refactor get_presigned_object_url

refactor get_presigned_policy_form_data

refactored upload-part-copy

* fixed object.unwrap

* update region

* made client Arc

* made client Arc

* update client

* update tests

* update segmented_bytes

* bench updated

* cleanup version handling

* cleanup of headers: multimap

* added inner in Client

* updated clients: added Into<String>in API

* Separated http_client and shared client items in Client
This commit is contained in:
Henk-Jan Lebbink
2025-04-23 19:18:18 +02:00
committed by GitHub
parent f23572dce8
commit 58d9203153
213 changed files with 9571 additions and 7201 deletions

View File

@@ -14,7 +14,7 @@
// limitations under the License.
use minio::s3::client::DEFAULT_REGION;
use minio::s3::response::BucketExistsResponse;
use minio::s3::response::{BucketExistsResponse, RemoveBucketResponse};
use minio::s3::types::S3Api;
use minio_common::test_context::TestContext;
@@ -24,8 +24,16 @@ async fn bucket_exists() {
let (bucket_name, _cleanup) = ctx.create_bucket_helper().await;
let resp: BucketExistsResponse = ctx.client.bucket_exists(&bucket_name).send().await.unwrap();
assert!(resp.exists);
assert_eq!(resp.bucket, bucket_name);
assert_eq!(resp.region, DEFAULT_REGION);
let resp: RemoveBucketResponse = ctx.client.remove_bucket(&bucket_name).send().await.unwrap();
assert_eq!(resp.bucket, bucket_name);
assert_eq!(resp.region, DEFAULT_REGION);
let resp: BucketExistsResponse = ctx.client.bucket_exists(&bucket_name).send().await.unwrap();
assert!(!resp.exists);
assert_eq!(resp.bucket, bucket_name);
assert_eq!(resp.region, "");
}