summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_interfaces_bridge.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-12-29 20:41:39 +0100
committerChristian Poessinger <christian@poessinger.com>2020-12-29 21:08:41 +0100
commitd36063f837e7b015e8f9fc3a19832bc36bceb61a (patch)
tree45acf51d2c738ff19043ffac79bf9cf887e4985f /smoketest/scripts/cli/test_interfaces_bridge.py
parent29e32d39ddd9cc1942f1826016d44897930b4248 (diff)
downloadvyos-1x-d36063f837e7b015e8f9fc3a19832bc36bceb61a.tar.gz
vyos-1x-d36063f837e7b015e8f9fc3a19832bc36bceb61a.zip
smoketest: run all tests with verbosity=2
Diffstat (limited to 'smoketest/scripts/cli/test_interfaces_bridge.py')
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_bridge.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_bridge.py b/smoketest/scripts/cli/test_interfaces_bridge.py
index 6c1efaf75..71a81a11f 100755
--- a/smoketest/scripts/cli/test_interfaces_bridge.py
+++ b/smoketest/scripts/cli/test_interfaces_bridge.py
@@ -45,7 +45,7 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest):
for tmp in Section.interfaces("ethernet"):
if not '.' in tmp:
self._members.append(tmp)
-
+
self.session.set(['interfaces','dummy','dum0'])
self.session.set(['interfaces','dummy','dum1'])
self.session.set(['interfaces','bonding','bond1','member','interface','dum0'])
@@ -55,7 +55,7 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest):
self._options['br0'] = []
for member in self._members:
self._options['br0'].append(f'member interface {member}')
-
+
def tearDown(self):
self.session.delete(['interfaces','bonding'])
self.session.delete(['interfaces','dummy'])
@@ -94,7 +94,7 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest):
self.session.delete(self._base_path + [interface, 'member'])
self.session.commit()
-
+
def test_vlan_filter(self):
""" Add member interface to bridge and set VLAN filter """
for interface in self._interfaces:
@@ -115,22 +115,22 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest):
# commit config
self.session.commit()
-
+
# Detect the vlan filter function
for interface in self._interfaces:
with open(f'/sys/class/net/{interface}/bridge/vlan_filtering', 'r') as f:
flags = f.read()
self.assertEqual(int(flags), 1)
-
+
# Execute the program to obtain status information
-
+
json_data = cmd('bridge -j vlan show', shell=True)
-
+
vlan_filter_status = None
-
+
vlan_filter_status = json.loads(json_data)
-
-
+
+
if vlan_filter_status is not None:
for interface_status in vlan_filter_status:
ifname = interface_status['ifname']
@@ -160,15 +160,15 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest):
self.assertTrue(True)
else:
self.assertTrue(False)
-
+
else:
self.assertTrue(False)
-
-
-
+
+
+
# check member interfaces are added on the bridge
-
+
for interface in self._interfaces:
bridge_members = []
for tmp in glob(f'/sys/class/net/{interface}/lower_*'):
@@ -207,5 +207,5 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest):
if __name__ == '__main__':
- unittest.main()
+ unittest.main(verbosity=2)