summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorbl0way <william.blonay@gmail.com>2025-10-24 13:19:16 +0200
committerChristian Breunig <christian@breunig.cc>2025-10-29 08:15:28 +0100
commitb0ffe03b917c894f684876facaacb48cdbdba690 (patch)
tree0ee905a2c96a3035808ac7ed00b7e15e38ec7c2f /smoketest/scripts/cli
parent761968da584199e74a23d6381b3f6b400906083f (diff)
downloadvyos-1x-b0ffe03b917c894f684876facaacb48cdbdba690.tar.gz
vyos-1x-b0ffe03b917c894f684876facaacb48cdbdba690.zip
frr: T7896: Configure frr profile with 'system frr profile' command
Co-authored-by: Christian Breunig <christian@breunig.cc>
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_system_frr.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_system_frr.py b/smoketest/scripts/cli/test_system_frr.py
index 588f52bf5..83cfdc5f8 100755
--- a/smoketest/scripts/cli/test_system_frr.py
+++ b/smoketest/scripts/cli/test_system_frr.py
@@ -150,6 +150,28 @@ class TestSystemFRR(VyOSUnitTestSHIM.TestCase):
self.assertTrue(bmp_enabled)
self.assertTrue(snmp_enabled)
+ def test_frr_profile_add_remove(self):
+ # test add profile
+ frr_profiles = ['traditional', 'datacenter']
+ for profile in frr_profiles:
+ # set the profile
+ self.cli_set(base_path + ['profile', profile])
+ self.cli_commit()
+ # read the config file and check content
+ self.assertIn(f'frr_profile="{profile}"', read_file(config_file))
+ # read the frr.conf file and check content
+ frrconfig = self.getFRRconfig()
+ self.assertIn(f'frr defaults {profile}', frrconfig)
+
+ # test remove profile
+ self.cli_delete(base_path + ['profile'])
+ self.cli_commit()
+ # read the config file and check content
+ self.assertIn(f'frr_profile="{frr_profiles[0]}"', read_file(config_file))
+ # read the frr.conf file and check content
+ frrconfig = self.getFRRconfig()
+ self.assertIn(f'frr defaults {frr_profiles[0]}', frrconfig)
+
def test_frr_file_descriptors(self):
file_descriptors = '4096'