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:
Stefan Agner 2025-11-24 11:46:23 +01:00 committed by GitHub
parent bb450cad4f
commit 3be0c13fc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 16 deletions

View File

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

View File

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