]> git.puffer.fish Git - mirror/frr.git/commitdiff
topotest: fix bgp-path-attributes-topology 4737/head
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Fri, 26 Jul 2019 20:32:48 +0000 (17:32 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Fri, 26 Jul 2019 20:35:45 +0000 (17:35 -0300)
The first RIB check wants to assert that we don't have the r7's routes
in r1, so right after that code the routers r2 and r3 are configured
then `verify_rib` is called again to check for those routes.

This test never passed, but it didn't cause failures because of the
`try`/`except`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
tests/topotests/bgp-path-attributes-topo1/test_bgp_path_attributes.py

index abd6b396d109f55e21289de8cebd36e757928425..2b9c411ff27417252e84f796763c5c96e8aceda6 100755 (executable)
@@ -218,11 +218,8 @@ def test_next_hop_attribute(request):
     # Verifying RIB routes
     dut = "r1"
     protocol = "bgp"
-    result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol)
-    try:
-        assert result is True
-    except AssertionError:
-        logger.info("Expected behaviour: %s", result)
+    result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False)
+    assert result is not True
 
     # Configure next-hop-self to bgp neighbor
     input_dict_1 = {