mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-22 20:36:38 +00:00
fix(kms): use .expect() instead of ? in test functions that return ()
7 call sites of wait_for_kms_ready() used ? in async test functions
that return () instead of Result. Changed to .expect("KMS ready").
This commit is contained in:
@@ -61,7 +61,7 @@ async fn test_metadata_replace_self_copy_of_sse_object_stays_decryptable() {
|
|||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.expect("failed to start RustFS with local KMS");
|
.expect("failed to start RustFS with local KMS");
|
||||||
kms_env.wait_for_kms_ready().await?;
|
kms_env.wait_for_kms_ready().await.expect("KMS ready");
|
||||||
|
|
||||||
let client = kms_env.base_env.create_s3_client();
|
let client = kms_env.base_env.create_s3_client();
|
||||||
// Deliberately an UNVERSIONED bucket: that is the branch where the store layer can service
|
// Deliberately an UNVERSIONED bucket: that is the branch where the store layer can service
|
||||||
@@ -160,7 +160,7 @@ async fn test_metadata_replace_self_copy_dropping_sse_rewrites_plaintext() {
|
|||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.expect("failed to start RustFS with local KMS");
|
.expect("failed to start RustFS with local KMS");
|
||||||
kms_env.wait_for_kms_ready().await?;
|
kms_env.wait_for_kms_ready().await.expect("KMS ready");
|
||||||
|
|
||||||
let client = kms_env.base_env.create_s3_client();
|
let client = kms_env.base_env.create_s3_client();
|
||||||
// Unversioned, and deliberately WITHOUT a bucket default-encryption rule, so the copy below
|
// Unversioned, and deliberately WITHOUT a bucket default-encryption rule, so the copy below
|
||||||
@@ -256,7 +256,7 @@ async fn test_metadata_replace_self_copy_under_bucket_default_sse_stays_decrypta
|
|||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.expect("failed to start RustFS with local KMS");
|
.expect("failed to start RustFS with local KMS");
|
||||||
kms_env.wait_for_kms_ready().await?;
|
kms_env.wait_for_kms_ready().await.expect("KMS ready");
|
||||||
|
|
||||||
let client = kms_env.base_env.create_s3_client();
|
let client = kms_env.base_env.create_s3_client();
|
||||||
let bucket = "copy-object-self-copy-bucket-default-sse-test";
|
let bucket = "copy-object-self-copy-bucket-default-sse-test";
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ async fn test_self_copy_of_historical_sse_s3_version_is_readable() {
|
|||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.expect("failed to start RustFS with local KMS");
|
.expect("failed to start RustFS with local KMS");
|
||||||
kms_env.wait_for_kms_ready().await?;
|
kms_env.wait_for_kms_ready().await.expect("KMS ready");
|
||||||
|
|
||||||
let client = kms_env.base_env.create_s3_client();
|
let client = kms_env.base_env.create_s3_client();
|
||||||
let bucket = "copy-object-version-restore-sse-test";
|
let bucket = "copy-object-version-restore-sse-test";
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ async fn test_local_kms_key_isolation() {
|
|||||||
.expect("Failed to start RustFS with Local KMS");
|
.expect("Failed to start RustFS with Local KMS");
|
||||||
|
|
||||||
// Wait a moment for RustFS to fully start up and initialize KMS
|
// Wait a moment for RustFS to fully start up and initialize KMS
|
||||||
kms_env.wait_for_kms_ready().await?;
|
kms_env.wait_for_kms_ready().await.expect("KMS ready");
|
||||||
|
|
||||||
info!("RustFS started with KMS auto-configuration, default_key_id: {}", default_key_id);
|
info!("RustFS started with KMS auto-configuration, default_key_id: {}", default_key_id);
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ async fn test_local_kms_large_file() {
|
|||||||
.expect("Failed to start RustFS with Local KMS");
|
.expect("Failed to start RustFS with Local KMS");
|
||||||
|
|
||||||
// Wait a moment for RustFS to fully start up and initialize KMS
|
// Wait a moment for RustFS to fully start up and initialize KMS
|
||||||
kms_env.wait_for_kms_ready().await?;
|
kms_env.wait_for_kms_ready().await.expect("KMS ready");
|
||||||
|
|
||||||
info!("RustFS started with KMS auto-configuration, default_key_id: {}", default_key_id);
|
info!("RustFS started with KMS auto-configuration, default_key_id: {}", default_key_id);
|
||||||
|
|
||||||
@@ -309,7 +309,7 @@ async fn test_local_kms_multipart_upload() {
|
|||||||
.expect("Failed to start RustFS with Local KMS");
|
.expect("Failed to start RustFS with Local KMS");
|
||||||
|
|
||||||
// Wait for KMS initialization
|
// Wait for KMS initialization
|
||||||
kms_env.wait_for_kms_ready().await?;
|
kms_env.wait_for_kms_ready().await.expect("KMS ready");
|
||||||
|
|
||||||
info!("RustFS started with KMS auto-configuration, default_key_id: {}", default_key_id);
|
info!("RustFS started with KMS auto-configuration, default_key_id: {}", default_key_id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user