diff options
author | Nicolas Fort <nicolasfort1988@gmail.com> | 2024-01-09 09:52:07 +0000 |
---|---|---|
committer | Nicolas Fort <nicolasfort1988@gmail.com> | 2024-01-09 09:52:07 +0000 |
commit | 56141ca2165f58dcfd7ef47afcdb1b227827d416 (patch) | |
tree | 9db35fffafdcc737609141aed547f2dfe20b31da /smoketest/scripts/cli/test_ha_vrrp.py | |
parent | d6b2144b3c017d9fd5b3bf8e69c17de7b80f0fa6 (diff) | |
download | vyos-1x-56141ca2165f58dcfd7ef47afcdb1b227827d416.tar.gz vyos-1x-56141ca2165f58dcfd7ef47afcdb1b227827d416.zip |
T1297: vrrp: backport VRRP GARP options to Equuleus
Diffstat (limited to 'smoketest/scripts/cli/test_ha_vrrp.py')
-rwxr-xr-x | smoketest/scripts/cli/test_ha_vrrp.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_ha_vrrp.py b/smoketest/scripts/cli/test_ha_vrrp.py index 7d8d7c643..8af1a314c 100755 --- a/smoketest/scripts/cli/test_ha_vrrp.py +++ b/smoketest/scripts/cli/test_ha_vrrp.py @@ -88,6 +88,14 @@ class TestVRRP(VyOSUnitTestSHIM.TestCase): priority = '123' preempt_delay = '400' startup_delay = '120' + garp_master_delay = '2' + garp_master_repeat = '3' + garp_master_refresh = '4' + garp_master_refresh_repeat = '5' + garp_interval = '1.5' + group_garp_master_delay = '12' + group_garp_master_repeat = '13' + group_garp_master_refresh = '14' vrrp_version = '3' for group in groups: @@ -113,9 +121,19 @@ class TestVRRP(VyOSUnitTestSHIM.TestCase): self.cli_set(group_base + ['authentication', 'type', 'plaintext-password']) self.cli_set(group_base + ['authentication', 'password', f'{group}']) + # GARP + self.cli_set(group_base + ['garp', 'master-delay', group_garp_master_delay]) + self.cli_set(group_base + ['garp', 'master-repeat', group_garp_master_repeat]) + self.cli_set(group_base + ['garp', 'master-refresh', group_garp_master_refresh]) + # Global parameters self.cli_set(global_param_base + ['startup-delay', f'{startup_delay}']) self.cli_set(global_param_base + ['version', vrrp_version]) + self.cli_set(global_param_base + ['garp', 'interval', f'{garp_interval}']) + self.cli_set(global_param_base + ['garp', 'master-delay', f'{garp_master_delay}']) + self.cli_set(global_param_base + ['garp', 'master-repeat', f'{garp_master_repeat}']) + self.cli_set(global_param_base + ['garp', 'master-refresh', f'{garp_master_refresh}']) + self.cli_set(global_param_base + ['garp', 'master-refresh-repeat', f'{garp_master_refresh_repeat}']) # commit changes self.cli_commit() @@ -124,6 +142,11 @@ class TestVRRP(VyOSUnitTestSHIM.TestCase): config = getConfig(f'global_defs') self.assertIn(f'vrrp_startup_delay {startup_delay}', config) self.assertIn(f'vrrp_version {vrrp_version}', config) + self.assertIn(f'vrrp_garp_interval {garp_interval}', config) + self.assertIn(f'vrrp_garp_master_delay {garp_master_delay}', config) + self.assertIn(f'vrrp_garp_master_repeat {garp_master_repeat}', config) + self.assertIn(f'vrrp_garp_master_refresh {garp_master_refresh}', config) + self.assertIn(f'vrrp_garp_master_refresh_repeat {garp_master_refresh_repeat}', config) for group in groups: vlan_id = group.lstrip('VLAN') @@ -144,6 +167,11 @@ class TestVRRP(VyOSUnitTestSHIM.TestCase): self.assertIn(f'auth_pass "{group}"', config) self.assertIn(f'auth_type PASS', config) + #GARP + self.assertIn(f'garp_master_delay {group_garp_master_delay}', config) + self.assertIn(f'garp_master_refresh {group_garp_master_refresh}', config) + self.assertIn(f'garp_master_repeat {group_garp_master_repeat}', config) + def test_03_sync_group(self): sync_group = 'VyOS' |