summaryrefslogtreecommitdiff
path: root/tests/unittests/test_ds_identify.py
diff options
context:
space:
mode:
authorAdam Dobrawy <naczelnik@jawnosc.tk>2019-10-04 23:15:10 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-10-04 23:15:10 +0000
commitd3b1c4ae6bd237a04ba5df4306ff38f752f72132 (patch)
treea913a7416b6aeaa6428038f4f0d3253e02c4595c /tests/unittests/test_ds_identify.py
parenta7d8d032a65e807007f1467a9220b7f161625668 (diff)
downloadvyos-cloud-init-d3b1c4ae6bd237a04ba5df4306ff38f752f72132.tar.gz
vyos-cloud-init-d3b1c4ae6bd237a04ba5df4306ff38f752f72132.zip
Add RbxCloud datasource
Diffstat (limited to 'tests/unittests/test_ds_identify.py')
-rw-r--r--tests/unittests/test_ds_identify.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py
index 7aeeb91c..c5b5c46c 100644
--- a/tests/unittests/test_ds_identify.py
+++ b/tests/unittests/test_ds_identify.py
@@ -267,10 +267,13 @@ class TestDsIdentify(DsIdentifyBase):
"""ConfigDrive datasource has a disk with LABEL=config-2."""
self._test_ds_found('ConfigDrive')
+ def test_rbx_cloud(self):
+ """Rbx datasource has a disk with LABEL=CLOUDMD."""
+ self._test_ds_found('RbxCloud')
+
def test_config_drive_upper(self):
"""ConfigDrive datasource has a disk with LABEL=CONFIG-2."""
self._test_ds_found('ConfigDriveUpper')
- return
def test_config_drive_seed(self):
"""Config Drive seed directory."""
@@ -896,6 +899,18 @@ VALID_CFG = {
os.path.join(P_SEED_DIR, 'config_drive', 'openstack',
'latest', 'meta_data.json'): 'md\n'},
},
+ 'RbxCloud': {
+ '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'},