From ed80211ad8e1aaa14b00ee592611fae96f51e6ef Mon Sep 17 00:00:00 2001 From: Eugene Bogomazov Date: Fri, 24 Jun 2022 12:28:13 +0300 Subject: [PATCH] bgpd: update topotests for role mismatch In topotests, we also want to check for role mismatch cases. However, if we are testing the sender of a role mismatch notification, sometimes it can have non-deterministic behavior (probably due to a configuration change). Thus, there is an assumption that the recipient of notifications will more consistently display the reason why the session was terminated in the first place. Signed-off-by: Eugene Bogomazov --- .../test_bgp_roles_capability.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/topotests/bgp_roles_capability/test_bgp_roles_capability.py b/tests/topotests/bgp_roles_capability/test_bgp_roles_capability.py index 33c77fece3..f72b6d2cee 100644 --- a/tests/topotests/bgp_roles_capability/test_bgp_roles_capability.py +++ b/tests/topotests/bgp_roles_capability/test_bgp_roles_capability.py @@ -110,11 +110,11 @@ def test_correct_pair(tgen): def test_role_pair_mismatch(tgen): # provider-peer mistmatch - router = tgen.gears["r1"] - neighbor_ip = "192.168.3.2" + router = tgen.gears["r3"] + neighbor_ip = "192.168.3.1" check_r3_mismatch = functools.partial(check_role_mismatch, router, neighbor_ip) success, result = topotest.run_and_expect(check_r3_mismatch, True, count=20, wait=3) - assert success, "Session with r3 was not correctly closed" + assert success, "Session between r1 and r3 was not correctly closed" def test_single_role_advertising(tgen): @@ -155,11 +155,11 @@ def test_single_role_receiving(tgen): def test_role_strict_mode(tgen): # provider-undefined pair with strict-mode - router = tgen.gears["r1"] - neighbor_ip = "192.168.5.2" + router = tgen.gears["r5"] + neighbor_ip = "192.168.5.1" check_r5_mismatch = functools.partial(check_role_mismatch, router, neighbor_ip) success, result = topotest.run_and_expect(check_r5_mismatch, True, count=20, wait=3) - assert success, "Session with r5 was not correctly closed" + assert success, "Session between r1 and r5 was not correctly closed" if __name__ == "__main__": -- 2.39.5