mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-26 05:56:50 +00:00
fix(e2e): align KMS test helpers with server API field names and env requirements (#4252)
This commit is contained in:
@@ -112,8 +112,8 @@ pub async fn create_default_key(
|
|||||||
secret_key: &str,
|
secret_key: &str,
|
||||||
) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
|
) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
|
||||||
let create_key_body = serde_json::json!({
|
let create_key_body = serde_json::json!({
|
||||||
"KeyUsage": "ENCRYPT_DECRYPT",
|
"key_usage": "ENCRYPT_DECRYPT",
|
||||||
"Description": "Default key for e2e testing"
|
"description": "Default key for e2e testing"
|
||||||
})
|
})
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
@@ -296,8 +296,8 @@ pub async fn test_kms_key_management(
|
|||||||
|
|
||||||
// Test CreateKey
|
// Test CreateKey
|
||||||
let create_key_body = serde_json::json!({
|
let create_key_body = serde_json::json!({
|
||||||
"KeyUsage": "EncryptDecrypt",
|
"key_usage": "EncryptDecrypt",
|
||||||
"Description": "Test key for e2e testing"
|
"description": "Test key for e2e testing"
|
||||||
})
|
})
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
@@ -777,7 +777,9 @@ impl LocalKMSTestEnvironment {
|
|||||||
default_key_id,
|
default_key_id,
|
||||||
];
|
];
|
||||||
|
|
||||||
self.base_env.start_rustfs_server(extra_args).await?;
|
self.base_env
|
||||||
|
.start_rustfs_server_with_env(extra_args, &[("RUSTFS_KMS_ALLOW_INSECURE_DEV_DEFAULTS", "true")])
|
||||||
|
.await?;
|
||||||
Ok(default_key_id.to_string())
|
Ok(default_key_id.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user