Watch
0
0
Fork
You've already forked hyperhive
0

hive-priv: one swap line, not lines, in the drop-in test text

The test message and a doc comment still said "swap lines" from the dropped two-line plan; the drop-in has the one MemorySwapMax=0 line.
This commit is contained in:
maia 2026-11-27 03:43:03 +01:00
commit 9ecc100798

View file

@ -991,8 +991,7 @@ mod tests {
}
/// No container swaps, budgeted or not: the cap sits right after the
/// memory lines, once. `infinity` is the
/// arm that used to keep swap.
/// memory lines, once. `infinity` is the arm that used to keep swap.
#[test]
fn swap_is_off_whatever_the_memory_budget() {
for mem in ["4G", "512M", "50%", "8589934592", "infinity"] {
@ -1001,14 +1000,14 @@ mod tests {
body.contains(&format!(
"\nMemoryMax={mem}\nMemorySwapMax=0\nCPUQuota=200%\n"
)),
"no swap lines under a budget of {mem}: {body}"
"no swap line under a budget of {mem}: {body}"
);
assert_eq!(body.matches("MemorySwapMax=").count(), 1, "{body}");
}
}
/// `MemoryHigh=` is the byte count the caller sends, between `MemoryMax=`
/// and the swap lines, and absent when none is sent.
/// and the swap line, and absent when none is sent.
#[test]
fn memory_high_is_rendered_only_when_sent() {
let with = limits_dropin_body(