From 985e6d50eceedd5ff0709b30788bcd213cdb4349 Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Thu, 6 Jul 2017 18:12:05 -0700 Subject: [PATCH] all_protocol_startup: More tolerant on interface MTU output - Allow 'MTU mismatch detection: enabled' and 'MTU mismatch detection:enabled' Signed-off-by: Martin Winter --- .../all-protocol-startup/r1/show_ip_ospf_interface.ref | 4 ++-- .../all-protocol-startup/test_all_protocol_startup.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/topotests/all-protocol-startup/r1/show_ip_ospf_interface.ref b/tests/topotests/all-protocol-startup/r1/show_ip_ospf_interface.ref index d134fb1c69..c29ed3db61 100644 --- a/tests/topotests/all-protocol-startup/r1/show_ip_ospf_interface.ref +++ b/tests/topotests/all-protocol-startup/r1/show_ip_ospf_interface.ref @@ -1,7 +1,7 @@ r1-eth0 is up ifindex 2, MTU 1500 bytes, BW XX Mbit Internet Address 192.168.0.1/24, Broadcast 192.168.0.255, Area 0.0.0.0 - MTU mismatch detection:enabled + MTU mismatch detection: enabled Router ID 192.168.0.1, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State DR, Priority 1 No backup designated router on this network @@ -12,7 +12,7 @@ r1-eth0 is up r1-eth3 is up ifindex 5, MTU 1500 bytes, BW XX Mbit Internet Address 192.168.3.1/26, Broadcast 192.168.3.63, Area 0.0.0.0 - MTU mismatch detection:enabled + MTU mismatch detection: enabled Router ID 192.168.0.1, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State DR, Priority 1 No backup designated router on this network diff --git a/tests/topotests/all-protocol-startup/test_all_protocol_startup.py b/tests/topotests/all-protocol-startup/test_all_protocol_startup.py index bbec24a0b4..083505349f 100755 --- a/tests/topotests/all-protocol-startup/test_all_protocol_startup.py +++ b/tests/topotests/all-protocol-startup/test_all_protocol_startup.py @@ -439,6 +439,8 @@ def test_ospfv2_interfaces(): actual = re.sub(r"BW [0-9]+ Mbit", "BW XX Mbit", actual) # Drop time in next due actual = re.sub(r"Hello due in [0-9\.]+s", "Hello due in XX.XXXs", actual) + # Fix 'MTU mismatch detection: enabled' vs 'MTU mismatch detection:enabled' - accept both + actual = re.sub(r"MTU mismatch detection:([a-z]+.*)", r"MTU mismatch detection: \1", actual) # Fix newlines (make them all the same) actual = ('\n'.join(actual.splitlines()) + '\n').splitlines(1) -- 2.39.5