summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Yang <yangyang1@zte.com.cn>2018-09-06 09:04:35 +0800
committerAlex Yang <yangyang1@zte.com.cn>2018-09-06 09:04:35 +0800
commit5012c278224472d7964e3e8abd9392c06869ded4 (patch)
treef898dd53282448889f59e17c4d62f3efed290914
parent776d2061bedda81278b421afde1b3d11cf48266e (diff)
Fix unittest
openrc was changed in [1] [1] https://gerrit.opnfv.org/gerrit/#/c/59839/ Change-Id: I30191475ce9a1b27a66d147519583d80b158547a Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
-rw-r--r--tests/data/openrc_conf/globals_odl.yml2
-rw-r--r--tests/unit/post/test_post_execute.py9
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/data/openrc_conf/globals_odl.yml b/tests/data/openrc_conf/globals_odl.yml
index 588dd92..2598ccb 100644
--- a/tests/data/openrc_conf/globals_odl.yml
+++ b/tests/data/openrc_conf/globals_odl.yml
@@ -11,3 +11,5 @@ neutron_external_interface: ens8
openstack_release: 4.0.2
storage_interface: ens3
tunnel_interface: ens3
+opendaylight_haproxy_restconf_port: '8087'
+opendaylight_haproxy_restconf_port_backup: '8181'
diff --git a/tests/unit/post/test_post_execute.py b/tests/unit/post/test_post_execute.py
index 55e345a..0ca0094 100644
--- a/tests/unit/post/test_post_execute.py
+++ b/tests/unit/post/test_post_execute.py
@@ -169,9 +169,12 @@ def test__config_kolla_admin_openrc(globals_file_name, openrc_conf_file_dir, tmp
elif globals_file_name == 'globals_odl.yml':
diff = DeepDiff(src_openrc_lines, dst_openrc_lines, ignore_order=True)
assert len(diff) == 1 and diff.get('iterable_item_added') is not None
- assert len(diff['iterable_item_added']) == 1
- for val in diff['iterable_item_added'].values():
- assert 'export SDN_CONTROLLER_IP' in val
+ assert len(diff['iterable_item_added']) == 3
+ diffvals = ','.join(diff['iterable_item_added'].values())
+ assert 'export SDN_CONTROLLER_IP' in diffvals
+ assert 'export SDN_CONTROLLER_WEBPORT=' in diffvals
+ assert 'export SDN_CONTROLLER_RESTCONFPORT=' in diffvals
+
tmpdir.remove()