From 5012c278224472d7964e3e8abd9392c06869ded4 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Thu, 6 Sep 2018 09:04:35 +0800 Subject: Fix unittest openrc was changed in [1] [1] https://gerrit.opnfv.org/gerrit/#/c/59839/ Change-Id: I30191475ce9a1b27a66d147519583d80b158547a Signed-off-by: Alex Yang --- tests/data/openrc_conf/globals_odl.yml | 2 ++ tests/unit/post/test_post_execute.py | 9 ++++++--- 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 588dd927..2598ccbb 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 55e345a2..0ca00941 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() -- cgit 1.2.3-korg