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:
parent
dfd4212e10
commit
9ecc100798
1 changed files with 3 additions and 4 deletions
|
|
@ -991,8 +991,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// No container swaps, budgeted or not: the cap sits right after the
|
/// No container swaps, budgeted or not: the cap sits right after the
|
||||||
/// memory lines, once. `infinity` is the
|
/// memory lines, once. `infinity` is the arm that used to keep swap.
|
||||||
/// arm that used to keep swap.
|
|
||||||
#[test]
|
#[test]
|
||||||
fn swap_is_off_whatever_the_memory_budget() {
|
fn swap_is_off_whatever_the_memory_budget() {
|
||||||
for mem in ["4G", "512M", "50%", "8589934592", "infinity"] {
|
for mem in ["4G", "512M", "50%", "8589934592", "infinity"] {
|
||||||
|
|
@ -1001,14 +1000,14 @@ mod tests {
|
||||||
body.contains(&format!(
|
body.contains(&format!(
|
||||||
"\nMemoryMax={mem}\nMemorySwapMax=0\nCPUQuota=200%\n"
|
"\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}");
|
assert_eq!(body.matches("MemorySwapMax=").count(), 1, "{body}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `MemoryHigh=` is the byte count the caller sends, between `MemoryMax=`
|
/// `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]
|
#[test]
|
||||||
fn memory_high_is_rendered_only_when_sent() {
|
fn memory_high_is_rendered_only_when_sent() {
|
||||||
let with = limits_dropin_body(
|
let with = limits_dropin_body(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue