feat(homeassistant): the page shows the device's storage and how full it is (#6753)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -533,6 +533,18 @@ def test_a_poll_keeps_the_system_problems_and_records_them(app):
|
||||
assert metrics["problems_open"] == 2.0 and metrics["disk_free_pct"] == 50.0 and metrics["update_failed"] == 0.0
|
||||
|
||||
|
||||
def test_the_page_shows_the_devices_storage_and_how_full_it_is(app):
|
||||
async def go():
|
||||
await _clean(app, health={"repairs_read": True, "problems": [], "disk_free_gb": 99.8,
|
||||
"disk_total_gb": 116.5, "disk_free_pct": 85.7})
|
||||
web, _ = await _admin_client(app)
|
||||
return await (await web.get("/plugins/homeassistant/")).get_data(as_text=True)
|
||||
|
||||
page = asyncio.run(go())
|
||||
assert "116.5 GB" in page and "14% full" in page
|
||||
assert "Disk free" not in page
|
||||
|
||||
|
||||
def test_a_report_it_couldnt_read_leaves_the_last_one_and_home_assistant_still_answers(app):
|
||||
sched = _ha("scheduler")
|
||||
ha = FakeHomeAssistant()
|
||||
|
||||
Reference in New Issue
Block a user