Switch swap threshold default to absolute 3048 MB and disable percent threshold by default
This commit is contained in:
@@ -67,4 +67,11 @@ def test_count_recent():
|
||||
def test_load_config_missing_file(tmp_path):
|
||||
config = c.load_config(str(tmp_path / "config.json"))
|
||||
assert config["port"] == 8731
|
||||
assert config["swap_threshold_percent"] == 25
|
||||
assert config["swap_threshold_percent"] is None
|
||||
assert config["swap_threshold_mb"] == 3048.0
|
||||
|
||||
|
||||
def test_threshold_absolute_default():
|
||||
config = c.merge_config({})
|
||||
assert c.threshold_exceeded(config, c.SwapStats(2048, 596.38, 1451.62)) is False
|
||||
assert c.threshold_exceeded(config, c.SwapStats(2048, 3048, 0)) is True
|
||||
|
||||
Reference in New Issue
Block a user