summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_opennebula.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-01-23 15:17:17 -0500
committerScott Moser <smoser@ubuntu.com>2014-01-23 15:17:17 -0500
commit573ee6d9d641356374ac616f53cb254d4da7c9db (patch)
treee96228256276875c47c5031160bd2f3cbe3b5398 /tests/unittests/test_datasource/test_opennebula.py
parent1781668dd65737a800c2c8fdbb79c6f1288d3ef2 (diff)
parentc833a84f08019ba4413937f2f1b1f12a4ffe5632 (diff)
downloadvyos-cloud-init-573ee6d9d641356374ac616f53cb254d4da7c9db.tar.gz
vyos-cloud-init-573ee6d9d641356374ac616f53cb254d4da7c9db.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():