diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:24:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:24:34 +0000 |
commit | 137ce8dd46d313f15ee93ddbb5428d702aa61ed8 (patch) | |
tree | a49f76849019651842962dff2197b705e33831e7 /tests/topotests/bgp_dont_capability_negotiate | |
parent | Releasing progress-linux version 9.1-0.1~progress7.99u1. (diff) | |
download | frr-137ce8dd46d313f15ee93ddbb5428d702aa61ed8.tar.xz frr-137ce8dd46d313f15ee93ddbb5428d702aa61ed8.zip |
Merging upstream version 10.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/topotests/bgp_dont_capability_negotiate')
-rw-r--r-- | tests/topotests/bgp_dont_capability_negotiate/test_bgp_dont_capability_negotiate.py | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/tests/topotests/bgp_dont_capability_negotiate/test_bgp_dont_capability_negotiate.py b/tests/topotests/bgp_dont_capability_negotiate/test_bgp_dont_capability_negotiate.py index ab71f87..9a0f562 100644 --- a/tests/topotests/bgp_dont_capability_negotiate/test_bgp_dont_capability_negotiate.py +++ b/tests/topotests/bgp_dont_capability_negotiate/test_bgp_dont_capability_negotiate.py @@ -122,8 +122,9 @@ def test_bgp_check_fqdn(): step("Wait to converge") test_func = functools.partial(bgp_converge, r1) _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5) - assert result is None, "Can't converge with dont-capability-negotiate" + assert result is None, "Can't converge with all capabilities" + step("Make sure FQDN capability is set") test_func = functools.partial(_bgp_check_fqdn, "r2") _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5) assert result is None, "FQDN capability enabled, but r1 can't see it" @@ -150,6 +151,48 @@ def test_bgp_check_fqdn(): _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5) assert result is None, "FQDN capability disabled, but we still have a hostname" + step("Re-enable sending any capability from r2") + r2.vtysh_cmd( + """ + configure terminal + router bgp 65002 + address-family ipv4 unicast + no neighbor 192.168.1.1 dont-capability-negotiate + end + clear bgp 192.168.1.1 + """ + ) + step("Wait to converge") + tgen = get_topogen() + test_func = functools.partial(bgp_converge, r1) + _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5) + assert result is None, "Can't converge with all capabilities re enabled" + + step("Make sure FQDN capability is r2") + test_func = functools.partial(_bgp_check_fqdn, "r2") + _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5) + assert result is None, "FQDN capability enabled, but r1 can't see it" + + step("Disable sending fqdn capability") + r2.vtysh_cmd( + """ + configure terminal + router bgp 65002 + no neighbor 192.168.1.1 capability fqdn + end + clear bgp 192.168.1.1 + """ + ) + step("Wait to converge") + tgen = get_topogen() + test_func = functools.partial(bgp_converge, r1) + _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5) + assert result is None, "Can't converge with no capability fqdn" + + step("Make sure FQDN capability is reset") + test_func = functools.partial(_bgp_check_fqdn) + _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5) + assert result is None, "FQDN capability disabled, but we still have a hostname" if __name__ == "__main__": args = ["-s"] + sys.argv[1:] |