summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_opennebula.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-01-17 15:12:57 -0500
committerScott Moser <smoser@ubuntu.com>2014-01-17 15:12:57 -0500
commit121f7e28e7388f167ae4607b73a2c5ac58f9ec83 (patch)
tree6e2d0c733a4d3d4166bc12eaa2c6c4d252a2ca79 /tests/unittests/test_datasource/test_opennebula.py
parent63a3fb1912f721ff161d75d956f6172a31971956 (diff)
parent98fd17c55b637f4e1d136c954567c1d9b23e6c20 (diff)
downloadvyos-cloud-init-121f7e28e7388f167ae4607b73a2c5ac58f9ec83.tar.gz
vyos-cloud-init-121f7e28e7388f167ae4607b73a2c5ac58f9ec83.zip
merge from trunk
Diffstat (limited to 'tests/unittests/test_datasource/test_opennebula.py')
-rw-r--r--tests/unittests/test_datasource/test_opennebula.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unittests/test_datasource/test_opennebula.py b/tests/unittests/test_datasource/test_opennebula.py
index e1812a88..6fc5b2ac 100644
--- a/tests/unittests/test_datasource/test_opennebula.py
+++ b/tests/unittests/test_datasource/test_opennebula.py
@@ -258,6 +258,14 @@ iface eth0 inet static
''')
+class TestParseShellConfig(MockerTestCase):
+ def test_no_seconds(self):
+ cfg = '\n'.join(["foo=bar", "SECONDS=2", "xx=foo"])
+ # we could test 'sleep 2', but that would make the test run slower.
+ ret = ds.parse_shell_config(cfg)
+ self.assertEqual(ret, {"foo": "bar", "xx": "foo"})
+
+
def populate_context_dir(path, variables):
data = "# Context variables generated by OpenNebula\n"
for (k, v) in variables.iteritems():