diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-03-03 20:35:21 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-03-03 20:35:21 +0100 |
commit | d4c40adfeac4686174388878520138b640884c45 (patch) | |
tree | fe80a962055f9e5025c4be7955effd84d1810fad /smoketest/scripts/cli/test_interfaces_tunnel.py | |
parent | 1442762a153df454dad2f282da21c745c13610ce (diff) | |
download | vyos-1x-d4c40adfeac4686174388878520138b640884c45.tar.gz vyos-1x-d4c40adfeac4686174388878520138b640884c45.zip |
tunnel: T2966: add ip6gretap encapsulation support
Diffstat (limited to 'smoketest/scripts/cli/test_interfaces_tunnel.py')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_tunnel.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_tunnel.py b/smoketest/scripts/cli/test_interfaces_tunnel.py index b5ee3e412..cad6764e6 100755 --- a/smoketest/scripts/cli/test_interfaces_tunnel.py +++ b/smoketest/scripts/cli/test_interfaces_tunnel.py @@ -105,7 +105,7 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): interface = f'tun1010' local_if_addr = f'10.10.200.1/24' - for encapsulation in ['ipip6', 'ip6ip6', 'ip6gre']: + for encapsulation in ['ipip6', 'ip6ip6', 'ip6gre', 'ip6gretap']: self.session.set(self._base_path + [interface, 'address', local_if_addr]) self.session.set(self._base_path + [interface, 'encapsulation', encapsulation]) self.session.set(self._base_path + [interface, 'source-address', self.local_v4]) @@ -123,14 +123,21 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): # Configure Tunnel Source interface self.session.set(self._base_path + [interface, 'source-interface', source_if]) + # Source interface can not be used with ip6gretap + if encapsulation in ['ip6gretap']: + with self.assertRaises(ConfigSessionError): + self.session.commit() + self.session.delete(self._base_path + [interface, 'source-interface']) # Check if commit is ok self.session.commit() conf = get_json_iface_options(interface) + if encapsulation not in ['ip6gretap']: + self.assertEqual(source_if, conf['link']) + self.assertEqual(interface, conf['ifname']) self.assertEqual(mtu, conf['mtu']) - self.assertEqual(source_if, conf['link']) # Not applicable for ip6gre if 'proto' in conf['linkinfo']['info_data']: |