Merge pull request #1978 from ogayot/restricted-block-probing+nvme

filesystem: probe NVMe controllers when running the restricted probe
This commit is contained in:
Olivier Gayot 2024-04-26 09:14:05 +02:00 committed by GitHub
commit 1d7c7c051c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -1270,7 +1270,7 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
@with_context(name="probe_once", description="restricted={restricted}") @with_context(name="probe_once", description="restricted={restricted}")
async def _probe_once(self, *, context, restricted): async def _probe_once(self, *, context, restricted):
if restricted: if restricted:
probe_types = {"blockdev", "filesystem"} probe_types = {"blockdev", "filesystem", "nvme"}
fname = "probe-data-restricted.json" fname = "probe-data-restricted.json"
key = "ProbeDataRestricted" key = "ProbeDataRestricted"
else: else:

View File

@ -108,7 +108,7 @@ class TestSubiquityControllerFilesystem(IsolatedAsyncioTestCase):
async def test_probe_restricted(self): async def test_probe_restricted(self):
await self.fsc._probe_once(context=None, restricted=True) await self.fsc._probe_once(context=None, restricted=True)
expected = {"blockdev", "filesystem"} expected = {"blockdev", "filesystem", "nvme"}
self.app.prober.get_storage.assert_called_with(expected) self.app.prober.get_storage.assert_called_with(expected)
async def test_probe_os_prober_false(self): async def test_probe_os_prober_false(self):