diff options
| author | Christian Breunig <christian@breunig.cc> | 2024-12-30 20:35:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-30 21:35:08 +0200 |
| commit | ec80c75d677608da438a9360657d9729296afc73 (patch) | |
| tree | 251f7fae72c82e295beb3201d0b4822aa7dd243f /smoketest/scripts/cli/test_protocols_bfd.py | |
| parent | b58576dcd6cac670211ead6c984c356d6bc98ea8 (diff) | |
| download | veeos-1x-ec80c75d677608da438a9360657d9729296afc73.tar.gz veeos-1x-ec80c75d677608da438a9360657d9729296afc73.zip | |
frr: T6746: additional improvements after 10.2 upgrade (#4259)
* smoketest: T6746: add substring search in getFRRconfig()
Some daemons (e.g. bgpd) have several nested substrings/sections like
router bgp 100
address-family ipv4 unicast
..
exit-address-family
exit
We can now use getFRRconfig() with the substring option to extract only
address-family ipv4 unicast
..
exit-address-family
Making config validation more granular
* frrender: T6746: only re-render FRR config if config_dict did change
* frrender: T6746: fix naming glitch isis/eigrp
* frrender: T6746: add --stdout option when running with debug flags
* smoketest: T6746: remove unneeded commit_guard time
It was an invalid workarround as the underlaying issue seems to be a race
condition in CStore.
The commit process is not finished until all pending files from
VYATTA_CHANGES_ONLY_DIR are copied to VYATTA_ACTIVE_CONFIGURATION_DIR. This is
done inside libvyatta-cfg1 and the FUSE UnionFS part. On large non-interactive
commits FUSE UnionFS might not replicate the real state in time, leading to
errors when querying the working and effective configuration.
TO BE DELETED AFTER SWITCH TO IN MEMORY CONFIG
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_bfd.py')
| -rwxr-xr-x | smoketest/scripts/cli/test_protocols_bfd.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bfd.py b/smoketest/scripts/cli/test_protocols_bfd.py index 32e39e8f7..f7ef3849f 100755 --- a/smoketest/scripts/cli/test_protocols_bfd.py +++ b/smoketest/scripts/cli/test_protocols_bfd.py @@ -22,7 +22,6 @@ from vyos.frrender import bfd_daemon from vyos.utils.process import process_named_running base_path = ['protocols', 'bfd'] -frr_endsection = '^ exit' dum_if = 'dum1001' vrf_name = 'red' @@ -131,7 +130,7 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase): self.cli_commit() # Verify FRR bgpd configuration - frrconfig = self.getFRRconfig('bfd', endsection='^exit', daemon=bfd_daemon) + frrconfig = self.getFRRconfig('bfd', endsection='^exit') for peer, peer_config in peers.items(): tmp = f'peer {peer}' if 'multihop' in peer_config: @@ -144,8 +143,8 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase): tmp += f' vrf {peer_config["vrf"]}' self.assertIn(tmp, frrconfig) - peerconfig = self.getFRRconfig(f' peer {peer}', end='', endsection=frr_endsection, - daemon=bfd_daemon) + peerconfig = self.getFRRconfig('bfd', endsection='^exit', substring=f' peer {peer}', + endsubsection='^ exit') if 'echo_mode' in peer_config: self.assertIn(f'echo-mode', peerconfig) if 'intv_echo' in peer_config: @@ -207,7 +206,8 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase): # Verify FRR bgpd configuration for profile, profile_config in profiles.items(): - config = self.getFRRconfig(f' profile {profile}', endsection=frr_endsection) + config = self.getFRRconfig('bfd', endsection='^exit', + substring=f' profile {profile}', endsubsection='^ exit',) if 'echo_mode' in profile_config: self.assertIn(f' echo-mode', config) if 'intv_echo' in profile_config: @@ -229,8 +229,8 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase): self.assertNotIn(f'shutdown', config) for peer, peer_config in peers.items(): - peerconfig = self.getFRRconfig(f' peer {peer}', end='', - endsection=frr_endsection, daemon=bfd_daemon) + peerconfig = self.getFRRconfig('bfd', endsection='^exit', + substring=f' peer {peer}', endsubsection='^ exit') if 'profile' in peer_config: self.assertIn(f' profile {peer_config["profile"]}', peerconfig) |
