summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_protocols_bfd.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-10-16 17:17:51 +0200
committerGitHub <noreply@github.com>2025-10-16 17:17:51 +0200
commit69a9b93f71c818bf134ea06ad73d86a513628f06 (patch)
tree304a5239108c55882d79d1a1e25246d7f1f6000f /smoketest/scripts/cli/test_protocols_bfd.py
parentd8dc670cd3eb7c9d0e41d8211284e1469657cc42 (diff)
parentb221b50a444c3c80f5c322b9c06d4c0288999944 (diff)
downloadvyos-1x-69a9b93f71c818bf134ea06ad73d86a513628f06.tar.gz
vyos-1x-69a9b93f71c818bf134ea06ad73d86a513628f06.zip
Merge pull request #4794 from c-po/reuse-frr-reload-py
frr: T7664: drop BASH/SED implementation in smoketest getFRRconfig()
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_bfd.py')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bfd.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bfd.py b/smoketest/scripts/cli/test_protocols_bfd.py
index 6923593f3..46d33edf3 100755
--- a/smoketest/scripts/cli/test_protocols_bfd.py
+++ b/smoketest/scripts/cli/test_protocols_bfd.py
@@ -17,7 +17,6 @@
import unittest
from base_vyostest_shim import VyOSUnitTestSHIM
-from base_vyostest_shim import CSTORE_GUARD_TIME
from vyos.configsession import ConfigSessionError
from vyos.frrender import bfd_daemon
@@ -88,9 +87,6 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase):
# Retrieve FRR daemon PID - it is not allowed to crash, thus PID must remain the same
cls.daemon_pid = process_named_running(bfd_daemon)
- # Enable CSTORE guard time required by FRR related tests
- cls._commit_guard_time = CSTORE_GUARD_TIME
-
# ensure we can also run this test on a live system - so lets clean
# out the current configuration :)
cls.cli_delete(cls, base_path)
@@ -135,7 +131,7 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase):
self.cli_commit()
# Verify FRR bgpd configuration
- frrconfig = self.getFRRconfig('bfd', endsection='^exit')
+ frrconfig = self.getFRRconfig('bfd', stop_section='^exit')
for peer, peer_config in peers.items():
tmp = f'peer {peer}'
if 'multihop' in peer_config:
@@ -148,8 +144,9 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase):
tmp += f' vrf {peer_config["vrf"]}'
self.assertIn(tmp, frrconfig)
- peerconfig = self.getFRRconfig('bfd', endsection='^exit', substring=f' peer {peer}',
- endsubsection='^ exit')
+ peerconfig = self.getFRRconfig('bfd', stop_section='^exit',
+ start_subsection=f' peer {peer}',
+ stop_subsection='^ exit')
if 'echo_mode' in peer_config:
self.assertIn(f'echo-mode', peerconfig)
if 'intv_echo' in peer_config:
@@ -211,8 +208,8 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase):
# Verify FRR bgpd configuration
for profile, profile_config in profiles.items():
- config = self.getFRRconfig('bfd', endsection='^exit',
- substring=f' profile {profile}', endsubsection='^ exit',)
+ config = self.getFRRconfig('bfd', stop_section='^exit',
+ start_subsection=f' profile {profile}', stop_subsection='^ exit',)
if 'echo_mode' in profile_config:
self.assertIn(f' echo-mode', config)
if 'intv_echo' in profile_config:
@@ -234,8 +231,8 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase):
self.assertNotIn(f'shutdown', config)
for peer, peer_config in peers.items():
- peerconfig = self.getFRRconfig('bfd', endsection='^exit',
- substring=f' peer {peer}', endsubsection='^ exit')
+ peerconfig = self.getFRRconfig('bfd', stop_section='^exit',
+ start_subsection=f' peer {peer}', stop_subsection='^ exit')
if 'profile' in peer_config:
self.assertIn(f' profile {peer_config["profile"]}', peerconfig)