1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 20:35:55 +00:00

Cleanup evaluations (#3857)

* Cleanup

* move

* Add OS available test

Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
This commit is contained in:
Joakim Sørensen
2022-09-13 19:19:07 +02:00
committed by GitHub
parent 5aa8028ff5
commit c67d4d7c0b
18 changed files with 42 additions and 38 deletions

View File

@@ -34,6 +34,21 @@ async def test_evaluation(coresys: CoreSys):
assert cgroup_version.reason not in coresys.resolution.unsupported
async def test_evaluation_os_available(coresys: CoreSys):
"""Test evaluation with OS available."""
cgroup_version = EvaluateCGroupVersion(coresys)
coresys.core.state = CoreState.SETUP
coresys.os._available = True
coresys.docker.info.cgroup = CGROUP_V2_VERSION
await cgroup_version()
assert cgroup_version.reason not in coresys.resolution.unsupported
coresys.docker.info.cgroup = CGROUP_V1_VERSION
await cgroup_version()
assert cgroup_version.reason not in coresys.resolution.unsupported
async def test_did_run(coresys: CoreSys):
"""Test that the evaluation ran as expected."""
cgroup_version = EvaluateCGroupVersion(coresys)