summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2025-01-07 14:43:55 +0100
committerGitHub <noreply@github.com>2025-01-07 14:43:55 +0100
commitc9c9608c70f25edaca3535ab374f7230bc7a5ea8 (patch)
tree4d5a19e9b549ebaff5985c0b447758dde3153816 /tests
parentMerge pull request #17780 from enkechen-panw/allowas-fix (diff)
parentbgpd: add documentation for show bgp router json command (diff)
downloadfrr-c9c9608c70f25edaca3535ab374f7230bc7a5ea8.tar.xz
frr-c9c9608c70f25edaca3535ab374f7230bc7a5ea8.zip
Merge pull request #17431 from krishna-samy/bgpd_json_commits
bgpd: show json output changes to optimize various show commands
Diffstat (limited to 'tests')
-rw-r--r--tests/topotests/bgp_gr_notification/test_bgp_gr_notification.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/topotests/bgp_gr_notification/test_bgp_gr_notification.py b/tests/topotests/bgp_gr_notification/test_bgp_gr_notification.py
index 5d8338d6e..7e39b83d8 100644
--- a/tests/topotests/bgp_gr_notification/test_bgp_gr_notification.py
+++ b/tests/topotests/bgp_gr_notification/test_bgp_gr_notification.py
@@ -187,6 +187,16 @@ def test_bgp_administrative_reset_gr():
"""
)
+ def _bgp_verify_show_bgp_router_json():
+ output = json.loads(r1.vtysh_cmd("show bgp router json"))
+ expected = {
+ "bgpStartedAt": "*",
+ "bgpStartedGracefully": False,
+ "bgpInMaintenanceMode": False,
+ "bgpInstanceCount": 1,
+ }
+ return topotest.json_cmp(output, expected)
+
step("Initial BGP converge")
test_func = functools.partial(_bgp_converge)
_, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
@@ -205,6 +215,11 @@ def test_bgp_administrative_reset_gr():
_, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Failed to send Administrative Reset notification from R2"
+ step("Check show bgp router json")
+ test_func = functools.partial(_bgp_verify_show_bgp_router_json)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ assert result is None, "Invalid BGP router details"
+
if __name__ == "__main__":
args = ["-s"] + sys.argv[1:]