From: Alex Yang Date: Thu, 6 Sep 2018 01:04:35 +0000 (+0800) Subject: Fix unittest X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F61859%2F1;p=daisy.git Fix unittest openrc was changed in [1] [1] https://gerrit.opnfv.org/gerrit/#/c/59839/ Change-Id: I30191475ce9a1b27a66d147519583d80b158547a Signed-off-by: Alex Yang --- 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()