diff options
| author | Eugene Bogomazov <eb@qrator.net> | 2022-06-24 12:28:13 +0300 |
|---|---|---|
| committer | Eugene Bogomazov <eb@qrator.net> | 2022-06-24 12:55:24 +0300 |
| commit | ed80211ad8e1aaa14b00ee592611fae96f51e6ef (patch) | |
| tree | 3726480dbfbffd729b3e30bb939e7670b977b2de | |
| parent | 865a7e7b3af4e5d97a81b2825839b4475b475dec (diff) | |
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 <eb@qrator.net>
| -rw-r--r-- | tests/topotests/bgp_roles_capability/test_bgp_roles_capability.py | 12 |
1 files 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__": |
