From 968afc284808d362402d0b075ce652a0c6cc7641 Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Tue, 31 Oct 2017 14:11:11 -0200 Subject: [PATCH] ldp-vpls-topo1: fix a json_cmp result assert Use the 'right' assert to show more detailed failure report and remove a unused variable. --- tests/topotests/ldp-vpls-topo1/test_ldp_vpls_topo1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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") -- 2.39.5