summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-09-07 07:57:26 -0400
committerDonald Sharp <sharpd@nvidia.com>2024-11-25 13:20:50 -0500
commit4f032a44a43345f42ccb5557a7b48805c99ad17e (patch)
tree63b0bc82680098c9d535291426790b3810ab5ca8
parent0bacbc6493ae0fb9b946e2df475367ea4541a5c8 (diff)
tests: Fix ospfapi client to clear ospf process
Test is failing locally: 2023-09-06 18:39:56,865 DEBUG: r1: vtysh result: Hello, this is FRRouting (version 9.1-dev). Copyright 1996-2005 Kunihiro Ishiguro, et al. r1# conf t r1(config)# router ospf r1(config-router)# ospf router-id 1.1.1.1 For this router-id change to take effect, use "clear ip ospf process" command r1(config-router)# 2023-09-06 18:39:56,865 DEBUG: root: GOT LINE: 'SUCCESS: 1.0.0.0' 2023-09-06 18:39:56,866 DEBUG: root: GOT LINE: '2023-09-06 18:39:55,982 INFO: TESTER: root: Waiting for 1.1.1.1' 2023-09-06 18:39:56,867 DEBUG: root: GOT LINE: '2023-09-06 18:39:55,982 DEBUG: TESTER: root: expected '1.1.1.1' != '1.0.0.0'' 2023-09-06 18:39:56,867 DEBUG: root: GOT LINE: 'waiting on notify' Sure looks like the router-id is not allowed to be changed because neighbors have already been formed. If we are changing the router-id then let's clear the process to allow it to correctly change. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--tests/topotests/ospfapi/test_ospf_clientapi.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/topotests/ospfapi/test_ospf_clientapi.py b/tests/topotests/ospfapi/test_ospf_clientapi.py
index 89a34ff9b5..9e00fcf11f 100644
--- a/tests/topotests/ospfapi/test_ospf_clientapi.py
+++ b/tests/topotests/ospfapi/test_ospf_clientapi.py
@@ -218,10 +218,12 @@ def _test_router_id(tgen, testbin):
step("router id: check for modified router id")
r1.vtysh_multicmd("conf t\nrouter ospf\nospf router-id 1.1.1.1")
+ r1.vtysh_multicmd("clear ip ospf process")
_wait_output(p, "SUCCESS: {}".format(waitlist[1]))
step("router id: check for restored router id")
r1.vtysh_multicmd("conf t\nrouter ospf\nospf router-id 1.0.0.0")
+ r1.vtysh_multicmd("clear ip ospf process")
_wait_output(p, "SUCCESS: {}".format(waitlist[2]))
except Exception as error:
logging.error("ERROR: %s", error)