added benchmarks (#142)

This commit is contained in:
Henk-Jan Lebbink
2025-03-29 23:26:11 +01:00
committed by GitHub
parent 0cccaf1663
commit f23572dce8
60 changed files with 1986 additions and 712 deletions

View File

@@ -13,41 +13,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
mod common;
use crate::common::{TestContext, create_bucket_helper};
use minio::s3::client::DEFAULT_REGION;
use minio::s3::response::{
DeleteBucketLifecycleResponse, GetBucketLifecycleResponse, SetBucketLifecycleResponse,
};
use minio::s3::types::{Filter, LifecycleConfig, LifecycleRule, S3Api};
use minio::s3::types::{LifecycleConfig, S3Api};
use minio_common::example::create_bucket_lifecycle_config_examples;
use minio_common::test_context::TestContext;
#[tokio::test(flavor = "multi_thread", worker_threads = 10)]
async fn set_get_delete_bucket_lifecycle() {
let ctx = TestContext::new_from_env();
let (bucket_name, _cleanup) = create_bucket_helper(&ctx).await;
let (bucket_name, _cleanup) = ctx.create_bucket_helper().await;
let config: LifecycleConfig = LifecycleConfig {
rules: vec![LifecycleRule {
abort_incomplete_multipart_upload_days_after_initiation: None,
expiration_date: None,
expiration_days: Some(365),
expiration_expired_object_delete_marker: None,
filter: Filter {
and_operator: None,
prefix: Some(String::from("logs/")),
tag: None,
},
id: String::from("rule1"),
noncurrent_version_expiration_noncurrent_days: None,
noncurrent_version_transition_noncurrent_days: None,
noncurrent_version_transition_storage_class: None,
status: true,
transition_date: None,
transition_days: None,
transition_storage_class: None,
}],
};
let config: LifecycleConfig = create_bucket_lifecycle_config_examples();
let resp: SetBucketLifecycleResponse = ctx
.client