summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-01-25 14:26:26 +0100
committerGitHub <noreply@github.com>2023-01-25 14:26:26 +0100
commitcf128449bac7f753d7853636758a74f370490ff3 (patch)
tree185220694aba68d41cbf27a1b0dd82f0f29d6c90 /smoketest/scripts
parent2e607d43c5acc3521a41e0155f8571aa42d14cdc (diff)
parent144b6e6e7b6230283ad8eccc374c443bffd74c3f (diff)
downloadvyos-1x-cf128449bac7f753d7853636758a74f370490ff3.tar.gz
vyos-1x-cf128449bac7f753d7853636758a74f370490ff3.zip
Merge pull request #1777 from nicolas-fort/T1297-garp
T1297: VRRP: add garp options to vrrp
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_ha_vrrp.py41
1 files changed, 35 insertions, 6 deletions
diff --git a/smoketest/scripts/cli/test_ha_vrrp.py b/smoketest/scripts/cli/test_ha_vrrp.py
index f18a4ab86..3a4de2d8d 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'
for group in groups:
vlan_id = group.lstrip('VLAN')
@@ -112,13 +120,32 @@ class TestVRRP(VyOSUnitTestSHIM.TestCase):
self.cli_set(group_base + ['authentication', 'type', 'plaintext-password'])
self.cli_set(group_base + ['authentication', 'password', f'{group}'])
- # Global parameters
- config = getConfig(f'global_defs')
- self.cli_set(global_param_base + ['startup-delay', f'{startup_delay}'])
+ # 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
+ #config = getConfig(f'global_defs')
+ self.cli_set(global_param_base + ['startup-delay', f'{startup_delay}'])
+ 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()
+ # Check Global parameters
+ config = getConfig(f'global_defs')
+ self.assertIn(f'vrrp_startup_delay {startup_delay}', 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')
vip = f'100.64.{vlan_id}.1/24'
@@ -137,9 +164,11 @@ class TestVRRP(VyOSUnitTestSHIM.TestCase):
# Authentication
self.assertIn(f'auth_pass "{group}"', config)
self.assertIn(f'auth_type PASS', config)
- # Global parameters
- config = getConfig(f'global_defs')
- self.assertIn(f'vrrp_startup_delay {startup_delay}', 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'