summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-11-06 21:31:38 +0100
committerChristian Breunig <christian@breunig.cc>2025-11-06 21:31:38 +0100
commit874eabd1bcaa1f37388020ec2f0f3a13624619ad (patch)
tree42978dd93beea95d1bdbc9b48c779276cc8a2d35 /smoketest/scripts/cli
parentc0deb11a5c0e678f1a2b3d4b34d3ee40db6478dc (diff)
downloadvyos-1x-874eabd1bcaa1f37388020ec2f0f3a13624619ad.tar.gz
vyos-1x-874eabd1bcaa1f37388020ec2f0f3a13624619ad.zip
smoketest: T7996: fix hardcoded "vrf red" search path in FRR config
Commit 186900f7165b2 ("smoketest: T7927: test DHCP route preservation") which was added to validate a bugfix for DHCP default routes added it's own little regression. Tests defined a VRF named red15, but when reading in the FRR configuration we have had a hardcoded search for "vrf red" instead. This has been fixed to re-use the defined VRF variable name we perform our test on.
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_vrf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_vrf.py b/smoketest/scripts/cli/test_vrf.py
index 0c77e899d..e1897eb8d 100755
--- a/smoketest/scripts/cli/test_vrf.py
+++ b/smoketest/scripts/cli/test_vrf.py
@@ -819,7 +819,7 @@ class VRFTest(VyOSUnitTestSHIM.TestCase):
# We need to wait until DHCP client has started and an IP address has been received
sleep(8)
- frrconfig = self.getFRRconfig('^vrf red', stop_section='^exit-vrf')
+ frrconfig = self.getFRRconfig(f'^vrf {vrf_name}', stop_section='^exit-vrf')
self.assertIn(f' ip route 0.0.0.0/0 {default_gateway} {dhcp_if_client} '\
f'tag 210 {default_distance}', frrconfig)
@@ -828,7 +828,7 @@ class VRFTest(VyOSUnitTestSHIM.TestCase):
self.cli_set(['protocols', 'static', 'route', '10.0.0.0/24', 'blackhole'])
self.cli_commit()
- frrconfig = self.getFRRconfig('^vrf red', stop_section='^exit-vrf')
+ frrconfig = self.getFRRconfig(f'^vrf {vrf_name}', stop_section='^exit-vrf')
self.assertIn(f' ip route 0.0.0.0/0 {default_gateway} {dhcp_if_client} '\
f'tag 210 {default_distance}', frrconfig)