Add integrity check (#3608)

* Add integrity check

* add API test

* add tests

* tests for add-ons
This commit is contained in:
Pascal Vizeli
2022-04-30 10:14:43 +02:00
committed by GitHub
parent 1c75b515e0
commit ca1f764080
20 changed files with 361 additions and 485 deletions

View File

@@ -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"