mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-25 21:46:50 +00:00
test(policy): validate default policies (#2985)
This commit is contained in:
@@ -762,6 +762,15 @@ mod test {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_default_policies_validate() {
|
||||||
|
for (name, policy) in default::DEFAULT_POLICIES.iter() {
|
||||||
|
policy
|
||||||
|
.validate()
|
||||||
|
.unwrap_or_else(|err| panic!("default policy {name} should validate: {err}"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_deny_only_checks_only_deny_statements() -> Result<()> {
|
async fn test_deny_only_checks_only_deny_statements() -> Result<()> {
|
||||||
let data = r#"
|
let data = r#"
|
||||||
|
|||||||
Reference in New Issue
Block a user