stop writing and attaching per-agent and per-hive bao policies
This commit is contained in:
parent
eac7f2a7c1
commit
139007e656
1 changed files with 253 additions and 419 deletions
|
|
@ -780,7 +780,7 @@ mod tests {
|
|||
|
||||
let request = WriteAclPolicy {
|
||||
name: "hive-pr1ma".to_owned(),
|
||||
policy: crate::policy::render("pr1ma").expect("a plain name is legal"),
|
||||
policy: crate::policy::effective_hive("pr1ma"),
|
||||
};
|
||||
assert_eq!(request.path(), "sys/policies/acl/hive-pr1ma");
|
||||
}
|
||||
|
|
@ -791,7 +791,7 @@ mod tests {
|
|||
|
||||
let request = WriteAclPolicy {
|
||||
name: "hive-pr1ma".to_owned(),
|
||||
policy: crate::policy::render("pr1ma").expect("a plain name is legal"),
|
||||
policy: crate::policy::effective_hive("pr1ma"),
|
||||
};
|
||||
let body = request
|
||||
.body()
|
||||
|
|
@ -799,10 +799,7 @@ mod tests {
|
|||
.expect("a policy write sends one");
|
||||
let sent: serde_json::Value =
|
||||
serde_json::from_slice(&body).expect("the body is the JSON the store parses");
|
||||
assert_eq!(
|
||||
sent["policy"],
|
||||
crate::policy::render("pr1ma").expect("legal")
|
||||
);
|
||||
assert_eq!(sent["policy"], crate::policy::effective_hive("pr1ma"));
|
||||
assert!(
|
||||
sent.get("name").is_none(),
|
||||
"`name` addresses the policy in the path; sending it too would make \
|
||||
|
|
|
|||
Loading…
Reference in a new issue