From: Martin Winter Date: Wed, 10 May 2017 16:41:53 +0000 (-0700) Subject: ldp-topo1: Adjust to accept new format in "show ip route" as introduced with PR 495... X-Git-Tag: frr-7.1-dev~151^2~326 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=faf94e5a3abd0e3772e13a1823647c1021e30469;p=matthieu%2Ffrr.git ldp-topo1: Adjust to accept new format in "show ip route" as introduced with PR 495 (extra comma) Signed-off-by: Martin Winter --- diff --git a/tests/topotests/ldp-topo1/r1/show_ipv4_route.ref b/tests/topotests/ldp-topo1/r1/show_ipv4_route.ref index e72a20bac0..ff99ff9866 100644 --- a/tests/topotests/ldp-topo1/r1/show_ipv4_route.ref +++ b/tests/topotests/ldp-topo1/r1/show_ipv4_route.ref @@ -1,7 +1,7 @@ O 1.1.1.1/32 [110/0] is directly connected, lo O>* 2.2.2.2/32 [110/10] via 10.0.1.2, r1-eth0 -O>* 3.3.3.3/32 [110/20] via 10.0.1.2, r1-eth0 label xxx -O>* 4.4.4.4/32 [110/20] via 10.0.1.2, r1-eth0 label xxx +O>* 3.3.3.3/32 [110/20] via 10.0.1.2, r1-eth0, label xxx +O>* 4.4.4.4/32 [110/20] via 10.0.1.2, r1-eth0, label xxx O 10.0.1.0/24 [110/10] is directly connected, r1-eth0 O>* 10.0.2.0/24 [110/20] via 10.0.1.2, r1-eth0 O>* 10.0.3.0/24 [110/20] via 10.0.1.2, r1-eth0 diff --git a/tests/topotests/ldp-topo1/r1/show_ipv4_route.ref-1 b/tests/topotests/ldp-topo1/r1/show_ipv4_route.ref-1 index e72a20bac0..ff99ff9866 100644 --- a/tests/topotests/ldp-topo1/r1/show_ipv4_route.ref-1 +++ b/tests/topotests/ldp-topo1/r1/show_ipv4_route.ref-1 @@ -1,7 +1,7 @@ O 1.1.1.1/32 [110/0] is directly connected, lo O>* 2.2.2.2/32 [110/10] via 10.0.1.2, r1-eth0 -O>* 3.3.3.3/32 [110/20] via 10.0.1.2, r1-eth0 label xxx -O>* 4.4.4.4/32 [110/20] via 10.0.1.2, r1-eth0 label xxx +O>* 3.3.3.3/32 [110/20] via 10.0.1.2, r1-eth0, label xxx +O>* 4.4.4.4/32 [110/20] via 10.0.1.2, r1-eth0, label xxx O 10.0.1.0/24 [110/10] is directly connected, r1-eth0 O>* 10.0.2.0/24 [110/20] via 10.0.1.2, r1-eth0 O>* 10.0.3.0/24 [110/20] via 10.0.1.2, r1-eth0 diff --git a/tests/topotests/ldp-topo1/r3/show_ipv4_route.ref b/tests/topotests/ldp-topo1/r3/show_ipv4_route.ref index f6e6199310..c8a29400b2 100644 --- a/tests/topotests/ldp-topo1/r3/show_ipv4_route.ref +++ b/tests/topotests/ldp-topo1/r3/show_ipv4_route.ref @@ -1,4 +1,4 @@ -O>* 1.1.1.1/32 [110/20] via 10.0.2.2, r3-eth0 label xxx +O>* 1.1.1.1/32 [110/20] via 10.0.2.2, r3-eth0, label xxx O>* 2.2.2.2/32 [110/10] via 10.0.2.2, r3-eth0 O 3.3.3.3/32 [110/0] is directly connected, lo O>* 4.4.4.4/32 [110/10] via 10.0.2.4, r3-eth0 diff --git a/tests/topotests/ldp-topo1/r3/show_ipv4_route.ref-1 b/tests/topotests/ldp-topo1/r3/show_ipv4_route.ref-1 index f6e6199310..c8a29400b2 100644 --- a/tests/topotests/ldp-topo1/r3/show_ipv4_route.ref-1 +++ b/tests/topotests/ldp-topo1/r3/show_ipv4_route.ref-1 @@ -1,4 +1,4 @@ -O>* 1.1.1.1/32 [110/20] via 10.0.2.2, r3-eth0 label xxx +O>* 1.1.1.1/32 [110/20] via 10.0.2.2, r3-eth0, label xxx O>* 2.2.2.2/32 [110/10] via 10.0.2.2, r3-eth0 O 3.3.3.3/32 [110/0] is directly connected, lo O>* 4.4.4.4/32 [110/10] via 10.0.2.4, r3-eth0 diff --git a/tests/topotests/ldp-topo1/r4/show_ipv4_route.ref b/tests/topotests/ldp-topo1/r4/show_ipv4_route.ref index bcef173a64..df2a2b585f 100644 --- a/tests/topotests/ldp-topo1/r4/show_ipv4_route.ref +++ b/tests/topotests/ldp-topo1/r4/show_ipv4_route.ref @@ -1,4 +1,4 @@ -O>* 1.1.1.1/32 [110/20] via 10.0.2.2, r4-eth0 label xxx +O>* 1.1.1.1/32 [110/20] via 10.0.2.2, r4-eth0, label xxx O>* 2.2.2.2/32 [110/10] via 10.0.2.2, r4-eth0 O>* 3.3.3.3/32 [110/10] via 10.0.2.3, r4-eth0 O 4.4.4.4/32 [110/0] is directly connected, lo diff --git a/tests/topotests/ldp-topo1/r4/show_ipv4_route.ref-1 b/tests/topotests/ldp-topo1/r4/show_ipv4_route.ref-1 index bcef173a64..df2a2b585f 100644 --- a/tests/topotests/ldp-topo1/r4/show_ipv4_route.ref-1 +++ b/tests/topotests/ldp-topo1/r4/show_ipv4_route.ref-1 @@ -1,4 +1,4 @@ -O>* 1.1.1.1/32 [110/20] via 10.0.2.2, r4-eth0 label xxx +O>* 1.1.1.1/32 [110/20] via 10.0.2.2, r4-eth0, label xxx O>* 2.2.2.2/32 [110/10] via 10.0.2.2, r4-eth0 O>* 3.3.3.3/32 [110/10] via 10.0.2.3, r4-eth0 O 4.4.4.4/32 [110/0] is directly connected, lo diff --git a/tests/topotests/ldp-topo1/test_ldp_topo1.py b/tests/topotests/ldp-topo1/test_ldp_topo1.py index 9d650e5cee..77857ad925 100755 --- a/tests/topotests/ldp-topo1/test_ldp_topo1.py +++ b/tests/topotests/ldp-topo1/test_ldp_topo1.py @@ -529,6 +529,8 @@ def test_zebra_ipv4_routingTable(): actual = re.sub(r", [0-2][0-9]:[0-5][0-9]:[0-5][0-9]", "", actual) # Mask out label actual = re.sub(r" label [0-9]+", " label xxx", actual) + # Add missing comma before label (for old version) + actual = re.sub(r"([0-9]) label xxx", r"\1, label xxx", actual) # Fix newlines (make them all the same) actual = ('\n'.join(actual.splitlines()) + '\n').splitlines(1)