summaryrefslogtreecommitdiff
path: root/tests/unittests/test_ds_identify.py
diff options
context:
space:
mode:
authorJames Falcon <TheRealFalcon@users.noreply.github.com>2020-08-07 10:19:09 -0500
committerGitHub <noreply@github.com>2020-08-07 11:19:09 -0400
commitc068f992c3905d07732dafa6eb61c1ae3aa65916 (patch)
tree6a58935c6660b3446020d205f098f3aeee9377a2 /tests/unittests/test_ds_identify.py
parentb2bf538b8c355b1bf04657fafc717ad20779e4a4 (diff)
downloadvyos-cloud-init-c068f992c3905d07732dafa6eb61c1ae3aa65916.tar.gz
vyos-cloud-init-c068f992c3905d07732dafa6eb61c1ae3aa65916.zip
Recognize LABEL_FATBOOT labels (#513)
Update DataSourceNoCloud and ds-identify to recognize LABEL_FATBOOT labels from blkid. Also updated associated tests. LP: #1841466
Diffstat (limited to 'tests/unittests/test_ds_identify.py')
-rw-r--r--tests/unittests/test_ds_identify.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py
index cb57f2d0..9314b244 100644
--- a/tests/unittests/test_ds_identify.py
+++ b/tests/unittests/test_ds_identify.py
@@ -577,6 +577,10 @@ class TestDsIdentify(DsIdentifyBase):
"""NoCloud is found with uppercase filesystem label."""
self._test_ds_found('NoCloudUpper')
+ def test_nocloud_fatboot(self):
+ """NoCloud fatboot label - LP: #184166."""
+ self._test_ds_found('NoCloud-fatboot')
+
def test_nocloud_seed(self):
"""Nocloud seed directory."""
self._test_ds_found('NoCloud-seed')
@@ -816,6 +820,20 @@ VALID_CFG = {
'dev/vdb': 'pretend iso content for cidata\n',
}
},
+ 'NoCloud-fatboot': {
+ 'ds': 'NoCloud',
+ 'mocks': [
+ MOCK_VIRT_IS_XEN,
+ {'name': 'blkid', 'ret': 0,
+ 'out': blkid_out(
+ BLKID_UEFI_UBUNTU +
+ [{'DEVNAME': 'xvdb', 'TYPE': 'vfat', 'SEC_TYPE': 'msdos',
+ 'UUID': '355a-4FC2', 'LABEL_FATBOOT': 'cidata'}])},
+ ],
+ 'files': {
+ 'dev/vdb': 'pretend iso content for cidata\n',
+ }
+ },
'NoCloud-seed': {
'ds': 'NoCloud',
'files': {