diff options
author | Christian Breunig <christian@breunig.cc> | 2023-05-26 22:21:55 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-05-27 08:57:12 +0200 |
commit | ec8ffd2c967d178c913be645c896434aa3212c9c (patch) | |
tree | 8b6df4cfa2ad2d4ca0fd570c47c685d8ec7d1295 /smoketest/scripts/cli/test_interfaces_virtual_ethernet.py | |
parent | 1395704d2692f2d57368e8cfa5b7b9e8791164cd (diff) | |
download | vyos-1x-ec8ffd2c967d178c913be645c896434aa3212c9c.tar.gz vyos-1x-ec8ffd2c967d178c913be645c896434aa3212c9c.zip |
smoketest: T5242: automatically detect interface "capabilities"
Current state of vyos-1x smoketests have hardcoded features to test. The
feature support is inside the base class BasicInterfaceTest
class BasicInterfaceTest:
class TestCase(VyOSUnitTestSHIM.TestCase):
_test_dhcp = False
_test_ip = False
_test_mtu = False
_test_vlan = False
_test_qinq = False
_test_ipv6 = False
_test_ipv6_pd = False
_test_ipv6_dhcpc6 = False
_test_mirror = False
All derived classes need to enable the tests that are supported on this
interface type. Adding new feature to a given interface (like vif support in
T5237) require manually enabling those tests for the given interface.
It would make much more sense, if we can query the config backend for supported
interface options - or in other words - is there a CLI node available that
corresponds to set interfaces ethernet <name> vif - if that's the case,
_test_vlan = True.
Diffstat (limited to 'smoketest/scripts/cli/test_interfaces_virtual_ethernet.py')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_virtual_ethernet.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_virtual_ethernet.py b/smoketest/scripts/cli/test_interfaces_virtual_ethernet.py index 4732342fc..e09846673 100755 --- a/smoketest/scripts/cli/test_interfaces_virtual_ethernet.py +++ b/smoketest/scripts/cli/test_interfaces_virtual_ethernet.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2022 VyOS maintainers and contributors +# Copyright (C) 2023 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -14,7 +14,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import os import unittest from vyos.ifconfig import Section @@ -23,9 +22,7 @@ from base_interfaces_test import BasicInterfaceTest class VEthInterfaceTest(BasicInterfaceTest.TestCase): @classmethod def setUpClass(cls): - cls._test_dhcp = True cls._base_path = ['interfaces', 'virtual-ethernet'] - cls._options = { 'veth0': ['peer-name veth1'], 'veth1': ['peer-name veth0'], @@ -35,5 +32,8 @@ class VEthInterfaceTest(BasicInterfaceTest.TestCase): # call base-classes classmethod super(VEthInterfaceTest, cls).setUpClass() + def test_vif_8021q_mtu_limits(self): + self.skipTest('not supported') + if __name__ == '__main__': unittest.main(verbosity=2) |