From baf11418c196ca72e6d570b64051d8ed35065abb Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Mon, 29 Jun 2020 19:52:13 +0200 Subject: RbxCloud: Add support for FreeBSD (#464) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes are made that simplify code and aim to properly support FreeBSD: - use `util.find_devs_with` instead call directly `blkid`, because on FreeBSD is not supported well and `util.find_devs_with` have solution for FreeBSD for that - introduction of an additional name on FAT file system, which is used in FreeBSD - drop shell to use default value, because FreeBSD – by default – does not have `/bin/bash` --- tests/unittests/test_ds_identify.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/unittests') diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py index fbb88e8a..cb57f2d0 100644 --- a/tests/unittests/test_ds_identify.py +++ b/tests/unittests/test_ds_identify.py @@ -273,6 +273,10 @@ class TestDsIdentify(DsIdentifyBase): """Rbx datasource has a disk with LABEL=CLOUDMD.""" self._test_ds_found('RbxCloud') + def test_rbx_cloud_lower(self): + """Rbx datasource has a disk with LABEL=cloudmd.""" + self._test_ds_found('RbxCloudLower') + def test_config_drive_upper(self): """ConfigDrive datasource has a disk with LABEL=CONFIG-2.""" self._test_ds_found('ConfigDriveUpper') @@ -948,6 +952,18 @@ VALID_CFG = { )}, ], }, + 'RbxCloudLower': { + 'ds': 'RbxCloud', + 'mocks': [ + {'name': 'blkid', 'ret': 0, + 'out': blkid_out( + [{'DEVNAME': 'vda1', 'TYPE': 'vfat', 'PARTUUID': uuid4()}, + {'DEVNAME': 'vda2', 'TYPE': 'ext4', + 'LABEL': 'cloudimg-rootfs', 'PARTUUID': uuid4()}, + {'DEVNAME': 'vdb', 'TYPE': 'vfat', 'LABEL': 'cloudmd'}] + )}, + ], + }, 'Hetzner': { 'ds': 'Hetzner', 'files': {P_SYS_VENDOR: 'Hetzner\n'}, -- cgit v1.2.3