Skip to content

Commit

Permalink
tests: add debugs and count in static_simple test
Browse files Browse the repository at this point in the history
Also add option to use unified config.

Signed-off-by: Christian Hopps <[email protected]>
  • Loading branch information
choppsv1 committed Oct 10, 2023
1 parent bfeaf66 commit a251d8e
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
23 changes: 23 additions & 0 deletions tests/topotests/static_simple/r1/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
log timestamp precision 6
log file frr.log

!debug northbound notifications
!debug northbound libyang
!debug northbound events
!debug northbound callbacks

!debug mgmt backend datastore frontend transaction
!debug mgmt client frontend
!debug mgmt client backend

interface r1-eth0
ip address 101.0.0.1/24
ipv6 address 2101::1/64
exit

interface r1-eth1 vrf red
ip address 102.0.0.1/24
ipv6 address 2102::1/64
exit

ip route 11.0.0.0/8 Null0
8 changes: 8 additions & 0 deletions tests/topotests/static_simple/r1/mgmtd.conf
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
log timestamp precision 3

!debug northbound notifications
!debug northbound libyang
!debug northbound events
!debug northbound callbacks
!debug mgmt backend datastore frontend transaction
!debug mgmt client frontend
!debug mgmt client backend
8 changes: 8 additions & 0 deletions tests/topotests/static_simple/r1/zebra.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
log timestamp precision 3

!debug northbound notifications
!debug northbound libyang
!debug northbound events
!debug northbound callbacks
!debug mgmt backend datastore frontend transaction
!debug mgmt client frontend
!debug mgmt client backend

interface r1-eth0
ip address 101.0.0.1/24
ipv6 address 2101::1/64
Expand Down
11 changes: 7 additions & 4 deletions tests/topotests/static_simple/test_static_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def tgen(request):
router.net.add_loop("lo-red")
router.net.attach_iface_to_l3vrf("lo-red", "red")
router.net.attach_iface_to_l3vrf(rname + "-eth1", "red")
#
# router.load_frr_config("frr.conf")
# and select daemons to run
router.load_config(TopoRouter.RD_ZEBRA, "zebra.conf")
router.load_config(TopoRouter.RD_MGMTD)
Expand Down Expand Up @@ -181,10 +183,11 @@ def guts(tgen, vrf, use_cli):

r1 = tgen.routers()["r1"]

step("add via gateway", reset=True)
do_config(r1, 1, True, False, vrf=vrf, use_cli=use_cli)
step("remove via gateway")
do_config(r1, 1, False, False, vrf=vrf, use_cli=use_cli)
count = 20000
step(f"add {count} via gateway", reset=True)
do_config(r1, count, True, False, vrf=vrf, use_cli=use_cli)
step(f"remove {count} via gateway")
do_config(r1, count, False, False, vrf=vrf, use_cli=use_cli)

via = f"lo-{vrf}" if vrf else "lo"
step("add via loopback")
Expand Down

0 comments on commit a251d8e

Please sign in to comment.