summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-09-08 09:36:28 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-09-08 09:38:27 +0200
commit59cf95974b2b9c0271c1ff9c9604b960c4bcfa26 (patch)
tree6a84aa6a36f982439a6a5afeeeb21d27f8c5111d
parent98f3bf16722e5e718130f960910d64bc76951e3b (diff)
Fix dict conversion in tempest.conf
https://github.com/openstack/oslo.config/blob/master/oslo_config/types.py#L600 https://build.opnfv.org/ci/view/fuel/job/functest-fuel-virtual-daily-master/817/consoleFull Change-Id: Icde9938bb9f6c0c37d2504317f31b0af4ef9ee8e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py2
-rw-r--r--functest/tests/unit/openstack/tempest/test_conf_utils.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index 80f78e979..e0b2a8e25 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -270,7 +270,7 @@ def configure_verifier(deployment_dir):
def convert_dict_to_ini(value):
"Convert dict to oslo.conf input"
assert isinstance(value, dict)
- return ",".join("{}={}".format(
+ return ",".join("{}:{}".format(
key, val) for (key, val) in six.iteritems(value))
diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py
index 7c493372f..3f4af3d9e 100644
--- a/functest/tests/unit/openstack/tempest/test_conf_utils.py
+++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py
@@ -186,9 +186,9 @@ class OSTempestConfUtilsTesting(unittest.TestCase):
self.assertEqual(
conf_utils.convert_dict_to_ini({}), "")
self.assertEqual(
- conf_utils.convert_dict_to_ini({"a": "b"}), "a=b")
+ conf_utils.convert_dict_to_ini({"a": "b"}), "a:b")
value = conf_utils.convert_dict_to_ini({"a": "b", "c": "d"})
- self.assertTrue(value == "a=b,c=d" or value == "c=d,a=b")
+ self.assertTrue(value == "a:b,c:d" or value == "c:d,a:b")
with self.assertRaises(AssertionError):
conf_utils.convert_list_to_ini("")