mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-09 10:59:43 +00:00
Add integrity check (#3608)
* Add integrity check * add API test * add tests * tests for add-ons
This commit is contained in:
@@ -33,3 +33,15 @@ async def test_api_security_options_pwned(api_client, coresys: CoreSys):
|
||||
await api_client.post("/security/options", json={"pwned": False})
|
||||
|
||||
assert not coresys.security.pwned
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_api_integrity_check(api_client, coresys: CoreSys):
|
||||
"""Test security integrity check."""
|
||||
coresys.security.content_trust = False
|
||||
|
||||
resp = await api_client.post("/security/integrity")
|
||||
result = await resp.json()
|
||||
|
||||
assert result["data"]["core"] == "untested"
|
||||
assert result["data"]["supervisor"] == "untested"
|
||||
|
||||
Reference in New Issue
Block a user