From 89644d5bf375eef6ddd7238b960eb9c32186b1c2 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Mon, 23 Sep 2024 09:49:36 +0300 Subject: [PATCH] tests: Simplify BGP dual-as topotest Test if we can establish a session with a global ASN directly. Signed-off-by: Donatas Abraitis --- tests/topotests/bgp_dual_as/r2/frr.conf | 2 +- .../topotests/bgp_dual_as/test_bgp_dual_as.py | 32 ------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/tests/topotests/bgp_dual_as/r2/frr.conf b/tests/topotests/bgp_dual_as/r2/frr.conf index cf5731b601..a901d49a53 100644 --- a/tests/topotests/bgp_dual_as/r2/frr.conf +++ b/tests/topotests/bgp_dual_as/r2/frr.conf @@ -4,7 +4,7 @@ interface r2-eth0 ! router bgp 65002 no bgp ebgp-requires-policy - neighbor 10.0.0.1 remote-as 65001 + neighbor 10.0.0.1 remote-as 65000 neighbor 10.0.0.1 timers 3 10 neighbor 10.0.0.1 timers connect 1 ! diff --git a/tests/topotests/bgp_dual_as/test_bgp_dual_as.py b/tests/topotests/bgp_dual_as/test_bgp_dual_as.py index fcac9c94ec..b202d7819b 100644 --- a/tests/topotests/bgp_dual_as/test_bgp_dual_as.py +++ b/tests/topotests/bgp_dual_as/test_bgp_dual_as.py @@ -54,38 +54,6 @@ def test_bgp_dual_as(): pytest.skip(tgen.errors) r1 = tgen.gears["r1"] - r2 = tgen.gears["r2"] - - def _bgp_converge_65001(): - output = json.loads(r1.vtysh_cmd("show bgp ipv4 summary json")) - expected = { - "ipv4Unicast": { - "as": 65000, - "peers": { - "10.0.0.2": { - "hostname": "r2", - "remoteAs": 65002, - "localAs": 65001, - "state": "Established", - "peerState": "OK", - } - }, - } - } - return topotest.json_cmp(output, expected) - - test_func = functools.partial(_bgp_converge_65001) - _, result = topotest.run_and_expect(test_func, None, count=30, wait=1) - assert result is None, "Can't establish BGP session using local-as AS 65001" - - step("Change remote-as from r2 to use global AS 65000") - r2.vtysh_cmd( - """ - configure terminal - router bgp - neighbor 10.0.0.1 remote-as 65000 - """ - ) def _bgp_converge_65000(): output = json.loads(r1.vtysh_cmd("show bgp ipv4 summary json")) -- 2.39.5