feat(routers): integrate Banana Pi Client API and onboard LibreSpeed measurements
Discover Ethernet routers under the board, map physical SIM slots, expose vendor controls and real telemetry, and provide packaged VPS speed tests with a live monochrome gauge. Enforce compact typography across Core and Node UI.
This commit is contained in:
@@ -285,3 +285,31 @@ def test_helper_failed_persistence_retains_retryable_profile(helper_manager):
|
||||
with pytest.raises(OSError):
|
||||
manager.dispatch(dict(action="forget", server_id=one))
|
||||
assert set(manager.profiles) == {one, two}
|
||||
|
||||
|
||||
def test_librespeed_running_test_blocks_removal_and_its_credential_is_removed(setup):
|
||||
from k1link.fleet.librespeed import LibreSpeed
|
||||
|
||||
manager, host, _, _, _ = setup
|
||||
store = LibreSpeed(manager.fleet.root)
|
||||
store.save(
|
||||
dict(
|
||||
id="ls_" + "a" * 32,
|
||||
endpoint="https://one.example:19445",
|
||||
fingerprint="b" * 64,
|
||||
state="connected",
|
||||
token="private",
|
||||
)
|
||||
)
|
||||
manager.fleet.routers = SimpleNamespace(
|
||||
pending={"one": {"speedtest_server": "ls_" + "a" * 32, "public": {"state": "applying"}}}
|
||||
)
|
||||
plan = manager.preview(host)
|
||||
assert plan["blocked"] and "LibreSpeed" in plan["services"]
|
||||
with pytest.raises(ValueError):
|
||||
manager.remove(host, plan["confirmation"])
|
||||
assert store.rows()
|
||||
manager.fleet.routers.pending.clear()
|
||||
plan = manager.preview(host)
|
||||
manager.remove(host, plan["confirmation"])
|
||||
assert store.rows() == []
|
||||
|
||||
Reference in New Issue
Block a user