feat: add a test macro (#170)

This commit is contained in:
Tobias Pütz
2025-06-23 13:38:40 +02:00
committed by GitHub
parent 720943b4bb
commit 8497fdb4ba
42 changed files with 665 additions and 464 deletions

View File

@@ -18,10 +18,9 @@ use minio::s3::types::S3Api;
use minio_common::cleanup_guard::CleanupGuard;
use minio_common::test_context::TestContext;
#[tokio::test(flavor = "multi_thread")]
async fn list_buckets() {
#[minio_macros::test(no_bucket)]
async fn list_buckets(ctx: TestContext) {
const N_BUCKETS: usize = 3;
let ctx = TestContext::new_from_env();
let mut names: Vec<String> = Vec::new();
let mut guards: Vec<CleanupGuard> = Vec::new();
@@ -48,4 +47,7 @@ async fn list_buckets() {
}
assert_eq!(guards.len(), N_BUCKETS);
assert_eq!(count, N_BUCKETS);
for guard in guards {
guard.cleanup().await;
}
}