fix(replication): fail closed on destination encryption (#5633)

* fix(replication): fail closed on destination encryption

* test(replication): avoid Debug bound in encryption assertion
This commit is contained in:
cxymds
2026-08-02 22:54:51 +08:00
committed by GitHub
parent 114b2420a2
commit 1fdcbd9225
3 changed files with 126 additions and 21 deletions
+5 -1
View File
@@ -3106,7 +3106,10 @@ mod tests {
#[test]
fn validate_replication_config_capabilities_names_unsupported_field() {
let mut rule = replication_rule_for_target("arn:rustfs:replication:us-east-1:target:bucket");
rule.destination.encryption_configuration = Some(s3s::dto::EncryptionConfiguration::default());
let destination_key_id = "arn:aws:kms:us-east-1:123456789012:key/opaque-key-id";
rule.destination.encryption_configuration = Some(s3s::dto::EncryptionConfiguration {
replica_kms_key_id: Some(destination_key_id.to_string()),
});
let config = ReplicationConfiguration {
role: String::new(),
rules: vec![rule],
@@ -3120,6 +3123,7 @@ mod tests {
err.to_string()
.contains("Destination.EncryptionConfiguration is not supported")
);
assert!(!err.to_string().contains(destination_key_id));
}
#[test]