diff options
author | Paul Querna <pquerna@apache.org> | 2014-01-09 21:14:51 +0000 |
---|---|---|
committer | Paul Querna <pquerna@apache.org> | 2014-01-09 21:14:51 +0000 |
commit | 66aa9826b818c3478516104b38039fecbd717b6b (patch) | |
tree | d0cd89f2fc6ede6716643239be2b0aeb6ff54217 /tests/unittests | |
parent | b9314a18a052e934643c93b81dc938b3e5b69307 (diff) | |
download | vyos-cloud-init-66aa9826b818c3478516104b38039fecbd717b6b.tar.gz vyos-cloud-init-66aa9826b818c3478516104b38039fecbd717b6b.zip |
Allow a Config Drive source on a partition, if the label matches.
Diffstat (limited to 'tests/unittests')
-rw-r--r-- | tests/unittests/test_datasource/test_configdrive.py | 5 |
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 |