Merge pull request #14367 from donaldsharp/ospfapi_test_failure

two test cleanups
This commit is contained in:
Russ White 2024-11-26 10:13:59 -05:00 committed by GitHub
commit c84a680097
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
!
router bgp 65001
bgp max-med on-startup 5 777
bgp max-med on-startup 30 777
no bgp ebgp-requires-policy
neighbor 192.168.255.2 remote-as 65001
neighbor 192.168.255.2 timers 3 10

View File

@ -82,12 +82,12 @@ def test_bgp_max_med_on_startup():
# Check session is established
test_func = functools.partial(_bgp_converge, router2)
_, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
_, result = topotest.run_and_expect(test_func, None, count=60, wait=1.0)
assert result is None, "Failed bgp convergence on r2"
# Check metric has value of max-med
test_func = functools.partial(_bgp_has_routes, router2, 777)
_, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
_, result = topotest.run_and_expect(test_func, None, count=60, wait=1.0)
assert result is None, "r2 does not receive routes with metric 777"
# Check that when the max-med timer expires, metric is updated

View File

@ -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)