mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-07 12:35: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
|
let inspect = src
|
||||||
.split("impl Operation for TransitionReconcileInspectHandler")
|
.split("impl Operation for TransitionReconcileInspectHandler")
|
||||||
.nth(1)
|
.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");
|
.expect("inspect handler block");
|
||||||
assert!(inspect.contains("AdminAction::ListTierAction"));
|
assert!(inspect.contains("AdminAction::ListTierAction"));
|
||||||
assert!(!inspect.contains("AdminAction::SetTierAction"));
|
assert!(!inspect.contains("AdminAction::SetTierAction"));
|
||||||
@@ -2502,7 +2502,7 @@ mod tests {
|
|||||||
let wrapper = extract_block_between_markers(
|
let wrapper = extract_block_between_markers(
|
||||||
production,
|
production,
|
||||||
"async fn authorize_transition_admin_request",
|
"async fn authorize_transition_admin_request",
|
||||||
"fn transition_transaction_id_from_params",
|
"async fn authorize_recovery_admin_request",
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|||||||
@@ -4070,14 +4070,13 @@ mod tests {
|
|||||||
abort_incomplete_multipart_upload: None,
|
abort_incomplete_multipart_upload: None,
|
||||||
del_marker_expiration: None,
|
del_marker_expiration: None,
|
||||||
filter: Some(s3s::dto::LifecycleRuleFilter {
|
filter: Some(s3s::dto::LifecycleRuleFilter {
|
||||||
|
and: Some(s3s::dto::LifecycleRuleAndOperator {
|
||||||
prefix: Some("logs/".to_string()),
|
prefix: Some("logs/".to_string()),
|
||||||
tag: Some(s3s::dto::Tag {
|
..Default::default()
|
||||||
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_expiration: None,
|
||||||
noncurrent_version_transitions: None,
|
noncurrent_version_transitions: None,
|
||||||
prefix: None,
|
prefix: None,
|
||||||
@@ -4087,7 +4086,7 @@ mod tests {
|
|||||||
&ObjectLockConfiguration::default(),
|
&ObjectLockConfiguration::default(),
|
||||||
)
|
)
|
||||||
.await
|
.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);
|
assert_eq!(*lifecycle_validation_error(&malformed).code(), S3ErrorCode::MalformedXML);
|
||||||
|
|
||||||
let invalid_value = validate_lifecycle_config(
|
let invalid_value = validate_lifecycle_config(
|
||||||
|
|||||||
Reference in New Issue
Block a user