mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-07 04:25:54 +00:00
test(ilm): align feature matrix lifecycle assertions (#7311)
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
@@ -2153,7 +2153,7 @@ mod tests {
|
||||
let inspect = src
|
||||
.split("impl Operation for TransitionReconcileInspectHandler")
|
||||
.nth(1)
|
||||
.and_then(|block| block.split("impl Operation for TransitionReconcileApplyHandler").next())
|
||||
.and_then(|block| block.split("pub struct IlmRecoveryControlListHandler").next())
|
||||
.expect("inspect handler block");
|
||||
assert!(inspect.contains("AdminAction::ListTierAction"));
|
||||
assert!(!inspect.contains("AdminAction::SetTierAction"));
|
||||
@@ -2502,7 +2502,7 @@ mod tests {
|
||||
let wrapper = extract_block_between_markers(
|
||||
production,
|
||||
"async fn authorize_transition_admin_request",
|
||||
"fn transition_transaction_id_from_params",
|
||||
"async fn authorize_recovery_admin_request",
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
|
||||
@@ -4070,14 +4070,13 @@ mod tests {
|
||||
abort_incomplete_multipart_upload: None,
|
||||
del_marker_expiration: None,
|
||||
filter: Some(s3s::dto::LifecycleRuleFilter {
|
||||
and: Some(s3s::dto::LifecycleRuleAndOperator {
|
||||
prefix: Some("logs/".to_string()),
|
||||
tag: Some(s3s::dto::Tag {
|
||||
key: Some("env".to_string()),
|
||||
value: Some("prod".to_string()),
|
||||
..Default::default()
|
||||
}),
|
||||
..Default::default()
|
||||
}),
|
||||
id: Some("two-predicates".to_string()),
|
||||
id: Some("one-member-and".to_string()),
|
||||
noncurrent_version_expiration: None,
|
||||
noncurrent_version_transitions: None,
|
||||
prefix: None,
|
||||
@@ -4087,7 +4086,7 @@ mod tests {
|
||||
&ObjectLockConfiguration::default(),
|
||||
)
|
||||
.await
|
||||
.expect_err("a Filter with two predicates is a schema violation");
|
||||
.expect_err("a Filter And with one predicate is a schema violation");
|
||||
assert_eq!(*lifecycle_validation_error(&malformed).code(), S3ErrorCode::MalformedXML);
|
||||
|
||||
let invalid_value = validate_lifecycle_config(
|
||||
|
||||
Reference in New Issue
Block a user