From: Rafael Zalamena Date: Tue, 31 Oct 2017 16:11:11 +0000 (-0200) Subject: ldp-vpls-topo1: fix a json_cmp result assert X-Git-Tag: frr-7.1-dev~151^2~202 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=968afc284808d362402d0b075ce652a0c6cc7641;p=matthieu%2Ffrr.git ldp-vpls-topo1: fix a json_cmp result assert Use the 'right' assert to show more detailed failure report and remove a unused variable. --- diff --git a/tests/topotests/ldp-vpls-topo1/test_ldp_vpls_topo1.py b/tests/topotests/ldp-vpls-topo1/test_ldp_vpls_topo1.py index 96e24b46b9..f96f0fd7d0 100755 --- a/tests/topotests/ldp-vpls-topo1/test_ldp_vpls_topo1.py +++ b/tests/topotests/ldp-vpls-topo1/test_ldp_vpls_topo1.py @@ -165,12 +165,12 @@ def router_compare_json_output_cb(rname, command, reference): def router_compare_json_output(rname, command, reference): logger.info('Comparing router "%s" "%s" output', rname, command) - tgen = get_topogen() # Run test function until we get an result. Wait at most 60 seconds. test_func = partial(router_compare_json_output_cb, rname, command, reference) - result, diff = topotest.run_and_expect(test_func, None, count=20, wait=3) - assert result, '"{}" JSON output mismatches the expected result'.format(rname) + _, diff = topotest.run_and_expect(test_func, None, count=20, wait=3) + assertmsg = '"{}" JSON output mismatches the expected result'.format(rname) + assert diff is None, assertmsg def test_ospf_convergence(): logger.info("Test: check OSPF adjacencies")