summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_configdrive.py
diff options
context:
space:
mode:
authorGreg Padgett <gpadgett@redhat.com>2013-04-10 12:19:37 -0400
committerScott Moser <smoser@ubuntu.com>2013-04-10 12:19:37 -0400
commitb9c6f197b6865987e9cdd2cd71fa1a5a9dff11c5 (patch)
tree05953e7b1d262fb783068209cffb9fd4a76080ce /tests/unittests/test_datasource/test_configdrive.py
parent1c2adfa3835e031a0f946cef0d99fcfe3dfc1c95 (diff)
parent984c72e522c585c6d3f6b3d3aec39fb21dd84028 (diff)
downloadvyos-cloud-init-b9c6f197b6865987e9cdd2cd71fa1a5a9dff11c5.tar.gz
vyos-cloud-init-b9c6f197b6865987e9cdd2cd71fa1a5a9dff11c5.zip
improvments to systemd/fedora 18 support
This branch contains fixes found while investigating integration of cloud-init into oVirt. They're in 3 categories: - compatibility with systemd configuration management (as used in Fedora 18) - workaround for a 2.6 kernel quirk which prevented 'blkid' from displaying /dev/sr0 in some cases - writing sysconfig files in typical convention, with a newline preceding EOF, to make some parsers happy
Diffstat (limited to 'tests/unittests/test_datasource/test_configdrive.py')
-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 930086db..d5935294 100644
--- a/tests/unittests/test_datasource/test_configdrive.py
+++ b/tests/unittests/test_datasource/test_configdrive.py
@@ -259,8 +259,9 @@ class TestConfigDriveDataSource(MockerTestCase):
def test_find_candidates(self):
devs_with_answers = {}
- def my_devs_with(criteria):
- return devs_with_answers[criteria]
+ def my_devs_with(*args, **kwargs):
+ criteria = args[0] if len(args) else kwargs.pop('criteria', None)
+ return devs_with_answers.get(criteria, [])
def my_is_partition(dev):
return dev[-1] in "0123456789" and not dev.startswith("sr")