summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/base_interfaces_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'smoketest/scripts/cli/base_interfaces_test.py')
-rw-r--r--smoketest/scripts/cli/base_interfaces_test.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/smoketest/scripts/cli/base_interfaces_test.py b/smoketest/scripts/cli/base_interfaces_test.py
index 8b04eb337..8a09dd96f 100644
--- a/smoketest/scripts/cli/base_interfaces_test.py
+++ b/smoketest/scripts/cli/base_interfaces_test.py
@@ -57,6 +57,7 @@ class BasicInterfaceTest:
_test_vlan = False
_test_qinq = False
_test_ipv6 = False
+ _test_ipv6_pd = False
_test_mirror = False
_base_path = []
@@ -126,7 +127,17 @@ class BasicInterfaceTest:
for intf in self._interfaces:
test_string=f'Description-Test-{intf}'
tmp = read_file(f'/sys/class/net/{intf}/ifalias')
- self.assertTrue(tmp, test_string)
+ self.assertEqual(tmp, test_string)
+ self.assertEqual(Interface(intf).get_alias(), test_string)
+ self.session.delete(self._base_path + [intf, 'description'])
+
+ self.session.commit()
+
+ # Validate remove interface description "empty"
+ for intf in self._interfaces:
+ tmp = read_file(f'/sys/class/net/{intf}/ifalias')
+ self.assertEqual(tmp, str())
+ self.assertEqual(Interface(intf).get_alias(), str())
def test_add_single_ip_address(self):
addr = '192.0.2.0/31'
@@ -367,7 +378,7 @@ class BasicInterfaceTest:
def test_dhcpv6pd_auto_sla_id(self):
- if not self._test_ipv6:
+ if not self._test_ipv6_pd:
self.skipTest('not enabled')
prefix_len = '56'
@@ -423,7 +434,7 @@ class BasicInterfaceTest:
self.session.delete(['interfaces', section, delegatee])
def test_dhcpv6pd_manual_sla_id(self):
- if not self._test_ipv6:
+ if not self._test_ipv6_pd:
self.skipTest('not enabled')
prefix_len = '56'