summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authoroniko94 <onikolaiev94@outlook.com>2025-03-07 14:31:10 +0200
committeroniko94 <onikolaiev94@outlook.com>2025-03-11 17:22:39 +0200
commitc9ddcc6a24a3539beda43d7b246d37cac1ed6ede (patch)
tree7958c4aa61477f793c14e9200d82f88b1e382870 /smoketest
parentb70e3686981e08e69938d6879575ca3f0f9adfbe (diff)
downloadvyos-1x-c9ddcc6a24a3539beda43d7b246d37cac1ed6ede.tar.gz
vyos-1x-c9ddcc6a24a3539beda43d7b246d37cac1ed6ede.zip
T7219: Add check for remote and group command to verify
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_vxlan.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_vxlan.py b/smoketest/scripts/cli/test_interfaces_vxlan.py
index b2076b43b..05900a4ba 100755
--- a/smoketest/scripts/cli/test_interfaces_vxlan.py
+++ b/smoketest/scripts/cli/test_interfaces_vxlan.py
@@ -25,6 +25,7 @@ from vyos.utils.network import interface_exists
from vyos.utils.network import get_vxlan_vlan_tunnels
from vyos.utils.network import get_vxlan_vni_filter
from vyos.template import is_ipv6
+from vyos import ConfigError
from base_interfaces_test import BasicInterfaceTest
def convert_to_list(ranges_to_convert):
@@ -114,6 +115,32 @@ class VXLANInterfaceTest(BasicInterfaceTest.TestCase):
self.assertEqual(Interface(interface).get_admin_state(), 'up')
ttl += 10
+
+ def test_vxlan_group_remote_error(self):
+ intf = 'vxlan60'
+ options = [
+ 'group 239.4.4.5',
+ 'mtu 1420',
+ 'remote 192.168.0.254',
+ 'source-address 192.168.0.1',
+ 'source-interface eth0',
+ 'vni 60'
+ ]
+ params = []
+ for option in options:
+ opts = option.split()
+ params.append(opts[0])
+ self.cli_set(self._base_path + [ intf ] + opts)
+
+ with self.assertRaises(ConfigSessionError) as cm:
+ self.cli_commit()
+
+ exception = cm.exception
+ self.assertIn('Both group and remote cannot be specified', str(exception))
+ for param in params:
+ self.cli_delete(self._base_path + [intf, param])
+
+
def test_vxlan_external(self):
interface = 'vxlan0'
source_address = '192.0.2.1'