test(harness): put each restart key on its own line

crates/xy-protocol now rejects a one-line KDL block with more than one
key, and Harness::write_server wrote its restart block on exactly one
line with four keys, so every integration test using it would fail to
parse its config under the new parser behavior. Split onto separate
lines so the intended 10ms/50ms/3 restart config actually takes
effect, instead of silently falling back to the 1s/30s/5 defaults as
it had been doing all along.
This commit is contained in:
2026-08-07 16:29:53 +02:00
parent 44304d0625
commit 3dcda14ba5
+1 -1
View File
@@ -36,7 +36,7 @@ impl Harness {
pub fn write_server(&self, name: &str, command: &str, port: u16, restart_policy: &str) { pub fn write_server(&self, name: &str, command: &str, port: u16, restart_policy: &str) {
let body = format!( let body = format!(
"command \"{command}\"\nport {port}\nrestart {{ policy \"{restart_policy}\" backoff-initial \"10ms\" backoff-max \"50ms\" max-retries-per-minute 3 }}\nstop {{ grace \"500ms\" }}\n" "command \"{command}\"\nport {port}\nrestart {{\n policy \"{restart_policy}\"\n backoff-initial \"10ms\"\n backoff-max \"50ms\"\n max-retries-per-minute 3\n}}\nstop {{ grace \"500ms\" }}\n"
); );
std::fs::write(self.config_dir.join(format!("{name}.kdl")), body).unwrap(); std::fs::write(self.config_dir.join(format!("{name}.kdl")), body).unwrap();
} }