1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-04-19 16:08:08 +01:00

Mark CGroup V2 supported on Home Assistant OS (#3778)

* Mark CGroup V2 supported on Home Assistant OS

* Fix tests

* Fix comparision

* Move evaluation of CGroup after OSManager has been initialized
This commit is contained in:
Stefan Agner
2022-08-09 11:32:51 +02:00
committed by GitHub
parent 29b2de6998
commit a92058e6fc
5 changed files with 115 additions and 23 deletions

View File

@@ -5,7 +5,6 @@ from unittest.mock import patch
from supervisor.const import CoreState
from supervisor.coresys import CoreSys
from supervisor.resolution.evaluations.docker_configuration import (
EXPECTED_CGROUP_VERSION,
EXPECTED_LOGGING,
EXPECTED_STORAGE,
EvaluateDockerConfiguration,
@@ -21,28 +20,18 @@ async def test_evaluation(coresys: CoreSys):
coresys.docker.info.storage = "unsupported"
coresys.docker.info.logging = EXPECTED_LOGGING
coresys.docker.info.cgroup = EXPECTED_CGROUP_VERSION
await docker_configuration()
assert docker_configuration.reason in coresys.resolution.unsupported
coresys.resolution.unsupported.clear()
coresys.docker.info.storage = EXPECTED_STORAGE
coresys.docker.info.logging = "unsupported"
coresys.docker.info.cgroup = EXPECTED_CGROUP_VERSION
await docker_configuration()
assert docker_configuration.reason in coresys.resolution.unsupported
coresys.resolution.unsupported.clear()
coresys.docker.info.storage = EXPECTED_STORAGE
coresys.docker.info.logging = EXPECTED_LOGGING
coresys.docker.info.cgroup = "unsupported"
await docker_configuration()
assert docker_configuration.reason in coresys.resolution.unsupported
coresys.resolution.unsupported.clear()
coresys.docker.info.storage = EXPECTED_STORAGE
coresys.docker.info.logging = EXPECTED_LOGGING
coresys.docker.info.cgroup = EXPECTED_CGROUP_VERSION
await docker_configuration()
assert docker_configuration.reason not in coresys.resolution.unsupported