aboutsummaryrefslogtreecommitdiffstats
path: root/tests/receptor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/receptor.rs')
-rw-r--r--tests/receptor.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/receptor.rs b/tests/receptor.rs
index 656ed1f..8bbadf4 100644
--- a/tests/receptor.rs
+++ b/tests/receptor.rs
@@ -536,6 +536,17 @@ fn command_line() {
assert_eq!(code, Some(0), "{stderr}");
let plan: Value = serde_json::from_str(&stdout).unwrap();
assert_eq!(plan["accepted"], json!(true));
+ // With the unit that runs --migrate named: started again if it failed (the fake
+ // systemctl says it did).
+ assert!(!host.reactions().contains("is-failed"));
+ let (code, _, stderr) = enstate(&["--apply", good.to_str().unwrap(), "--unit=enstate.service"]);
+ assert_eq!(code, Some(0), "{stderr}");
+ assert!(
+ host.reactions()
+ .contains("is-failed --quiet enstate.service\nstart --no-block enstate.service\n"),
+ "{}",
+ host.reactions()
+ );
let (code, stdout, _) = enstate(&["--status"]);
assert_eq!(code, Some(0));
assert!(