fix: hide synthetic rtt history keys from plugin accordion list
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
"""Tests for the plugin-accordion visibility filter in http.py."""
|
||||
from hbd.server.http import _visible_plugin_names
|
||||
|
||||
|
||||
def test_visible_plugin_names_excludes_rtt_history_keys():
|
||||
plugin_data = {
|
||||
"cpu_monitor": [],
|
||||
"rtt_ipv4": [],
|
||||
"rtt_ipv6": [],
|
||||
"network_monitor": [],
|
||||
}
|
||||
result = _visible_plugin_names(plugin_data)
|
||||
assert sorted(result) == ["cpu_monitor", "network_monitor"]
|
||||
|
||||
|
||||
def test_visible_plugin_names_empty_when_no_plugins():
|
||||
assert _visible_plugin_names({}) == []
|
||||
|
||||
|
||||
def test_visible_plugin_names_keeps_names_not_prefixed_with_rtt_():
|
||||
plugin_data = {"nagios_runner": [], "os_info": []}
|
||||
result = _visible_plugin_names(plugin_data)
|
||||
assert sorted(result) == ["nagios_runner", "os_info"]
|
||||
Reference in New Issue
Block a user