Steward orders: pin the new show properties; the unknown-action probe counts runs instead of expecting none
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d29bf93be6
commit
631fb7836b
1 changed files with 5 additions and 11 deletions
|
|
@ -2838,11 +2838,12 @@ mod tests {
|
||||||
assert_eq!(outcome_of_unit(&h, verb, "quiet-actions.service"), Outcome::Ran, "{verb:?}");
|
assert_eq!(outcome_of_unit(&h, verb, "quiet-actions.service"), Outcome::Ran, "{verb:?}");
|
||||||
}
|
}
|
||||||
// An action this check does not know is not checked, so it does not run.
|
// An action this check does not know is not checked, so it does not run.
|
||||||
|
let ran = h.runs().len();
|
||||||
h.describe("odd-action.service", &[("SuccessAction", "implode")]);
|
h.describe("odd-action.service", &[("SuccessAction", "implode")]);
|
||||||
let id = h.accept(h.issue_unit(Verb::Start, "odd-action.service"));
|
let id = h.accept(h.issue_unit(Verb::Start, "odd-action.service"));
|
||||||
execute(&h.ctx, &id).unwrap();
|
execute(&h.ctx, &id).unwrap();
|
||||||
assert!(matches!(h.outcome(&id), Outcome::Failed { exit_code: None, signal: None }));
|
assert!(matches!(h.outcome(&id), Outcome::Failed { exit_code: None, signal: None }));
|
||||||
assert!(h.runs().is_empty());
|
assert_eq!(h.runs().len(), ran);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
@ -2884,14 +2885,6 @@ mod tests {
|
||||||
assert_eq!(outcome_of_unit(&h, Verb::Start, "journald.service"), Outcome::Ran);
|
assert_eq!(outcome_of_unit(&h, Verb::Start, "journald.service"), Outcome::Ran);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn show_asks_for_every_property_the_refusal_reads() {
|
|
||||||
let asked = show_properties();
|
|
||||||
for property in ["DefaultDependencies", "SuccessAction", "FailureAction", "StartLimitAction", "JobTimeoutAction", "OnFailure", "OnSuccess"] {
|
|
||||||
assert!(asked.split(',').any(|asked| asked == property), "{property}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn a_unit_systemd_cannot_show_is_a_failure_not_a_leaf() {
|
fn a_unit_systemd_cannot_show_is_a_failure_not_a_leaf() {
|
||||||
let h = harness();
|
let h = harness();
|
||||||
|
|
@ -3379,8 +3372,9 @@ mod tests {
|
||||||
// The request asks for exactly the properties the parse reads.
|
// The request asks for exactly the properties the parse reads.
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
show_properties(),
|
show_properties(),
|
||||||
"Id,Names,LoadState,ActiveState,Requires,Requisite,BindsTo,Wants,Upholds,\
|
"Id,Names,LoadState,ActiveState,DefaultDependencies,SuccessAction,FailureAction,\
|
||||||
Conflicts,ConflictedBy,RequiredBy,BoundBy,RequisiteOf,ConsistsOf,\
|
StartLimitAction,JobTimeoutAction,OnFailure,OnSuccess,Requires,Requisite,BindsTo,\
|
||||||
|
Wants,Upholds,Conflicts,ConflictedBy,RequiredBy,BoundBy,RequisiteOf,ConsistsOf,\
|
||||||
PropagatesStopTo,StopPropagatedFrom"
|
PropagatesStopTo,StopPropagatedFrom"
|
||||||
);
|
);
|
||||||
// A backslash outside quotes is a backslash; inside, it escapes one character.
|
// A backslash outside quotes is a backslash; inside, it escapes one character.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue