From c8814cf9692577c6bf963d2cfc4118f9ee1cd32a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 25 Jan 2020 12:01:15 +0100 Subject: interface: add test for bridge member interfaces --- scripts/cli/test_interfaces.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/cli/test_interfaces.py b/scripts/cli/test_interfaces.py index 8b1318791..0e7c4dc07 100755 --- a/scripts/cli/test_interfaces.py +++ b/scripts/cli/test_interfaces.py @@ -90,6 +90,23 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest): self._base_path = ['interfaces', 'bridge'] self._interfaces = ['br0'] + def test_add_remove_member(self): + members = list_interfaces_of_type("ethernet") + + for intf in self._interfaces: + cost = 1000 + priority = 10 + + self.session.set(self._base_path + [intf, 'stp']) + for member in members: + self.session.set(self._base_path + [intf, 'member', 'interface', member]) + self.session.set(self._base_path + [intf, 'member', 'interface', member, 'cost', str(cost)]) + self.session.set(self._base_path + [intf, 'member', 'interface', member, 'priority', str(priority)]) + cost += 1 + priority += 1 + + self.session.commit() + if __name__ == '__main__': unittest.main() -- cgit v1.2.3