diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-14 20:48:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 20:48:20 +0200 |
commit | c944188a7e220141207687d04db74eb3a3961e7a (patch) | |
tree | 37f7c60009b3ba61167c3aa77863975d2bf0e021 /smoketest/scripts/cli/test_interfaces_bonding.py | |
parent | 0e02a8321f34069832ccd4266b5a82d48b82186a (diff) | |
parent | ae815d1b11a4c17df6aea45e3fc87772a0e40e6a (diff) | |
download | vyos-1x-c944188a7e220141207687d04db74eb3a3961e7a.tar.gz vyos-1x-c944188a7e220141207687d04db74eb3a3961e7a.zip |
Merge pull request #1283 from sever-sever/T4354
smoketest: T4354: Add test for uniq bonding members
Diffstat (limited to 'smoketest/scripts/cli/test_interfaces_bonding.py')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_bonding.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_bonding.py b/smoketest/scripts/cli/test_interfaces_bonding.py index 4f2fe979a..9bb561275 100755 --- a/smoketest/scripts/cli/test_interfaces_bonding.py +++ b/smoketest/scripts/cli/test_interfaces_bonding.py @@ -165,5 +165,27 @@ class BondingInterfaceTest(BasicInterfaceTest.TestCase): self.cli_commit() + def test_bonding_uniq_member_description(self): + ethernet_path = ['interfaces', 'ethernet'] + for interface in self._interfaces: + for option in self._options.get(interface, []): + self.cli_set(self._base_path + [interface] + option.split()) + + self.cli_commit() + + # Add any changes on bonding members + # For example add description on separate ethX interfaces + for interface in self._interfaces: + for member in self._members: + self.cli_set(ethernet_path + [member, 'description', member + '_interface']) + + self.cli_commit() + + # verify config + for interface in self._interfaces: + slaves = read_file(f'/sys/class/net/{interface}/bonding/slaves').split() + for member in self._members: + self.assertIn(member, slaves) + if __name__ == '__main__': unittest.main(verbosity=2) |