test(desktop): keep pending policy true in failed-deploy setup

failed_deploy_preserves_pending_policy stamped applied_permission_policy
via a setup deploy whose owner-only payload matched the record's default
respond_to, clearing provider_policy_pending before the failure it meant
to test. Make the setup deploy stale (respond_to=anyone) so pending stays
true, mirroring successful_stale_deploy_preserves_newer_pending_policy.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
Duncan
2026-08-25 13:32:20 -04:00
parent 6aa331521a
commit 8672302cb8

View File

@@ -364,6 +364,10 @@ mod tests {
#[test]
fn failed_deploy_preserves_pending_policy() {
let mut record = record();
// Stamp a confirmed `applied_permission_policy` via a stale (mismatched)
// deploy so `provider_policy_pending` stays true going into the failure:
// the payload's `owner-only` audience differs from this record's `anyone`.
record.respond_to = crate::managed_agents::RespondTo::Anyone;
apply_deploy_result(
&mut record,