Watch
0
0
Fork
You've already forked hyperhive
0

stop writing and attaching per-agent and per-hive bao policies

This commit is contained in:
atlas 2026-10-26 23:02:08 +01:00
commit 139007e656

View file

@ -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 \