mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-10 00:39:22 -06:00
Drop Debian 12 from supported OS list (#6337)
* Drop Debian 12 from supported OS list With the deprecation of Home Assistant Supervised installation method Debian 12 is no longer supported. This change removes Debian 12 from the list of supported operating systems in the evaluation logic. * Improve tests
This commit is contained in:
parent
bb450cad4f
commit
3be0c13fc5
@ -5,8 +5,6 @@ from ...coresys import CoreSys
|
||||
from ..const import UnsupportedReason
|
||||
from .base import EvaluateBase
|
||||
|
||||
SUPPORTED_OS = ["Debian GNU/Linux 12 (bookworm)"]
|
||||
|
||||
|
||||
def setup(coresys: CoreSys) -> EvaluateBase:
|
||||
"""Initialize evaluation-setup function."""
|
||||
@ -33,6 +31,4 @@ class EvaluateOperatingSystem(EvaluateBase):
|
||||
|
||||
async def evaluate(self) -> bool:
|
||||
"""Run evaluation."""
|
||||
if self.sys_os.available:
|
||||
return False
|
||||
return self.sys_host.info.operating_system not in SUPPORTED_OS
|
||||
return not self.sys_os.available
|
||||
|
||||
@ -5,10 +5,7 @@ from unittest.mock import MagicMock, patch
|
||||
|
||||
from supervisor.const import CoreState
|
||||
from supervisor.coresys import CoreSys
|
||||
from supervisor.resolution.evaluations.operating_system import (
|
||||
SUPPORTED_OS,
|
||||
EvaluateOperatingSystem,
|
||||
)
|
||||
from supervisor.resolution.evaluations.operating_system import EvaluateOperatingSystem
|
||||
|
||||
|
||||
async def test_evaluation(coresys: CoreSys):
|
||||
@ -25,13 +22,7 @@ async def test_evaluation(coresys: CoreSys):
|
||||
assert operating_system.reason in coresys.resolution.unsupported
|
||||
|
||||
coresys.os._available = True
|
||||
await operating_system()
|
||||
assert operating_system.reason not in coresys.resolution.unsupported
|
||||
coresys.os._available = False
|
||||
|
||||
coresys.host._info = MagicMock(
|
||||
operating_system=SUPPORTED_OS[0], timezone=None, timezone_tzinfo=None
|
||||
)
|
||||
assert coresys.os.available
|
||||
await operating_system()
|
||||
assert operating_system.reason not in coresys.resolution.unsupported
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user