summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2014-01-23 14:11:05 -0500
committerScott Moser <smoser@ubuntu.com>2014-01-23 14:11:05 -0500
commit814b32b5b6e6e8639fdbfb41eab2531f25c248d9 (patch)
treee0f07a21954100206e237567e5489404fef5e701 /tests
parent131ff5e3955ac489d68330034cee044a4ca9d6f0 (diff)
parent66aa9826b818c3478516104b38039fecbd717b6b (diff)
downloadvyos-cloud-init-814b32b5b6e6e8639fdbfb41eab2531f25c248d9.tar.gz
vyos-cloud-init-814b32b5b6e6e8639fdbfb41eab2531f25c248d9.zip
Consider partitions as sources for configdrive if labelled correctly
This change removes the filtering of partitions from potential ConfigDrive sources, if the LABEL of the partition is set to "config-2". This is useful for a bare metal device. It may not have a separate device for ConfigDrive, but instead have a ConfigDrive available on a partition.
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_datasource/test_configdrive.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unittests/test_datasource/test_configdrive.py b/tests/unittests/test_datasource/test_configdrive.py
index d5935294..3c1e8add 100644
--- a/tests/unittests/test_datasource/test_configdrive.py
+++ b/tests/unittests/test_datasource/test_configdrive.py
@@ -285,10 +285,11 @@ class TestConfigDriveDataSource(MockerTestCase):
self.assertEqual(["/dev/vdb", "/dev/zdd"],
ds.find_candidate_devs())
- # verify that partitions are not considered
+ # verify that partitions are considered, but only if they have a label.
devs_with_answers = {"TYPE=vfat": ["/dev/sda1"],
"TYPE=iso9660": [], "LABEL=config-2": ["/dev/vdb3"]}
- self.assertEqual([], ds.find_candidate_devs())
+ self.assertEqual(["/dev/vdb3"],
+ ds.find_candidate_devs())
finally:
util.find_devs_with = orig_find_devs_with