Skip to content

Commit

Permalink
topotato: make RIP tests a bit more tolerant
Browse files Browse the repository at this point in the history
Some whitespace changed between versions.  Also the ECMP test needs the
CLI command to exist.

Signed-off-by: David Lamparter <[email protected]>
  • Loading branch information
eqvinox committed Oct 1, 2024
1 parent a60c01d commit 14ac4d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test_rip.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test(self, topo, r1, r2, r3, rtsta):
r1-stub3
Routing Information Sources:
Gateway BadPackets BadRoutes Distance Last Update
193.1.1.2 0 0 120 $$[0-9:]+$$
193.1.1.2 $$\s*$$ 0 0 120 $$\s*[0-9:]+$$
Distance: (default is 120)
"""
yield from AssertVtysh.make(
Expand All @@ -138,8 +138,8 @@ def test(self, topo, r1, r2, r3, rtsta):
193.1.2.0/24
Routing Information Sources:
Gateway BadPackets BadRoutes Distance Last Update
193.1.1.1 0 0 120 $$[0-9:]+$$
193.1.2.3 0 0 120 $$[0-9:]+$$
193.1.1.1 $$\s*$$ 0 0 120 $$\s*[0-9:]+$$
193.1.2.3 $$\s*$$ 0 0 120 $$\s*[0-9:]+$$
Distance: (default is 120)
"""
yield from AssertVtysh.make(
Expand All @@ -161,7 +161,7 @@ def test(self, topo, r1, r2, r3, rtsta):
193.1.2.0/24
Routing Information Sources:
Gateway BadPackets BadRoutes Distance Last Update
193.1.2.2 0 0 120 $$[0-9:]+$$
193.1.2.2 $$\s*$$ 0 0 120 $$\s*[0-9:]+$$
Distance: (default is 120)
"""
yield from AssertVtysh.make(
Expand Down
3 changes: 3 additions & 0 deletions test_rip_allow_ecmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class Configs(FRRConfigs):
#% endblock
"""

def requirements(self):
self.require_defun("rip_allow_ecmp_cmd", "MULTIPATH_NUM")


class RIPAllowECMP(TestBase, AutoFixture, topo=topology, configs=Configs):
def ecmp_nexthops(self, *routers):
Expand Down

0 comments on commit 14ac4d5

Please sign in to comment.