Check for duplicate data disks only when the OS is available (#6025)

* Check for duplicate data disks only when the OS is available

Supervised installations do not have a specific data disk, so only
check for duplicate data disks on Home Assistant OS.

* Enable OS for multiple data disks check test
This commit is contained in:
Stefan Agner 2025-07-16 10:43:15 +02:00 committed by GitHub
parent c617358855
commit 780ae1e15c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,9 @@ class CheckMultipleDataDisks(CheckBase):
async def run_check(self) -> None:
"""Run check if not affected by issue."""
if not self.sys_os.available:
return
for block_device in self.sys_dbus.udisks2.block_devices:
if self._block_device_has_name_issue(block_device):
self.sys_resolution.create_issue(

View File

@ -33,6 +33,7 @@ async def test_base(coresys: CoreSys):
assert multiple_data_disks.enabled
@pytest.mark.usefixtures("os_available")
async def test_check(coresys: CoreSys, sda1_block_service: BlockService):
"""Test check."""
multiple_data_disks = CheckMultipleDataDisks(coresys)