remove hive-level infra-container restart from web ui and agents
This commit is contained in:
parent
ccf9951e5d
commit
7516a4e10e
17 changed files with 112 additions and 272 deletions
|
|
@ -390,8 +390,8 @@ mod tests {
|
|||
entry: crate::audit_log::AuditEntry {
|
||||
id: 1,
|
||||
ts_unix: hive_sh4re::wire_time::from_secs(0),
|
||||
agent: "atlas".into(),
|
||||
action: "restart_infra".into(),
|
||||
agent: "operator".into(),
|
||||
action: "stop_infra".into(),
|
||||
target: "hive-ci".into(),
|
||||
outcome: "ok".into(),
|
||||
detail: None,
|
||||
|
|
@ -419,21 +419,21 @@ mod tests {
|
|||
entry: crate::audit_log::AuditEntry {
|
||||
id: 42,
|
||||
ts_unix: hive_sh4re::wire_time::from_secs(1_700_000_000),
|
||||
agent: "atlas".into(),
|
||||
action: "restart_infra".into(),
|
||||
agent: "operator".into(),
|
||||
action: "stop_infra".into(),
|
||||
target: "hive-gateway".into(),
|
||||
outcome: "err".into(),
|
||||
detail: Some("denied: missing infra_admin capability".into()),
|
||||
detail: Some("systemctl stop failed".into()),
|
||||
},
|
||||
};
|
||||
let v: serde_json::Value = serde_json::to_value(&ev).expect("serialise");
|
||||
assert_eq!(v["kind"], "audit_entry_added");
|
||||
assert_eq!(v["seq"], 7);
|
||||
assert_eq!(v["id"], 42);
|
||||
assert_eq!(v["agent"], "atlas");
|
||||
assert_eq!(v["agent"], "operator");
|
||||
assert_eq!(v["target"], "hive-gateway");
|
||||
assert_eq!(v["outcome"], "err");
|
||||
assert_eq!(v["detail"], "denied: missing infra_admin capability");
|
||||
assert_eq!(v["detail"], "systemctl stop failed");
|
||||
// Not nested — there must be no `entry` sub-object.
|
||||
assert!(v.get("entry").is_none());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue