diff options
| author | Christian Breunig <christian@breunig.cc> | 2025-11-07 16:41:14 +0100 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2025-11-07 16:41:14 +0100 |
| commit | 316b31e304db92d87e63321628be21f9f4cd1387 (patch) | |
| tree | 6aed31cf9f7c58a7603069e69854b3e3dc146959 /smoketest/scripts/cli/test_system_ip.py | |
| parent | da679f0cf8fe048bae7d648a4f447db47032f3c0 (diff) | |
| download | vyos-1x-316b31e304db92d87e63321628be21f9f4cd1387.tar.gz vyos-1x-316b31e304db92d87e63321628be21f9f4cd1387.zip | |
smoketest: T7966: perform full regex match with ^ and $
Commit 9775bb49e ("frr: T7664: drop BASH/SED implementation in smoketest
getFRRconfig()") changed how we searched strings using a regex. In the
past we searched at the beginning of a line ^ till the end $. THis logic
was dropped in commit 9775bb49e marking some tests failing as they matched,
when they should not match.
Example: getFRRconfig('vrf red') showed output for both VRF red and red15 as
both started with "red". This has been fixed.
Diffstat (limited to 'smoketest/scripts/cli/test_system_ip.py')
| -rwxr-xr-x | smoketest/scripts/cli/test_system_ip.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_system_ip.py b/smoketest/scripts/cli/test_system_ip.py index fadbdec47..3784d4630 100755 --- a/smoketest/scripts/cli/test_system_ip.py +++ b/smoketest/scripts/cli/test_system_ip.py @@ -86,14 +86,16 @@ class TestSystemIP(VyOSUnitTestSHIM.TestCase): protocols = ['any', 'babel', 'bgp', 'connected', 'eigrp', 'isis', 'kernel', 'ospf', 'rip', 'static', 'table'] + rule_num = '10' + for protocol in protocols: - self.cli_set(['policy', 'route-map', f'route-map-{protocol}', 'rule', '10', 'action', 'permit']) + self.cli_set(['policy', 'route-map', f'route-map-{protocol}', 'rule', rule_num, 'action', 'permit']) self.cli_set(base_path + ['protocol', protocol, 'route-map', f'route-map-{protocol}']) self.cli_commit() # Verify route-map properly applied to FRR - frrconfig = self.getFRRconfig('ip protocol', stop_section='^end') + frrconfig = self.getFRRconfig('ip protocol', end_marker='', stop_section='^end') for protocol in protocols: self.assertIn(f'ip protocol {protocol} route-map route-map-{protocol}', frrconfig) |
