]> git.puffer.fish Git - mirror/frr.git/commitdiff
ldp-vpls-topo1: fix a json_cmp result assert
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 31 Oct 2017 16:11:11 +0000 (14:11 -0200)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:12 +0000 (20:22 -0500)
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

index 96e24b46b9a447640d617724b4c12ac9acefba0f..f96f0fd7d03f510cbbcdc7ba20aaca020143d669 100755 (executable)
@@ -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")