From 19aed865742f2cbd8e870bbf608dc1911cc581da Mon Sep 17 00:00:00 2001 From: Jian Zhang Date: Mon, 5 Dec 2022 18:38:00 +0800 Subject: [PATCH] test-network: add test for bond mac address config Signed-off-by: Jian Zhang (cherry picked from commit 23b6bf274fc1a46d8778bfc979d3c803d61a1f5c) (cherry picked from commit 6d7b0dacc6db1adad10d070a99f533555c90490e) --- test/test-network/conf/23-bond199.network | 3 +++ test/test-network/systemd-networkd-tests.py | 1 + 2 files changed, 4 insertions(+) diff --git a/test/test-network/conf/23-bond199.network b/test/test-network/conf/23-bond199.network index 9f4879ff24..6a1f9a1bc7 100644 --- a/test/test-network/conf/23-bond199.network +++ b/test/test-network/conf/23-bond199.network @@ -4,3 +4,6 @@ Name=bond199 [Network] IPv6AcceptRA=no + +[Link] +MACAddress=00:11:22:33:44:55 diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 37d2151a8d..35adb9eeb7 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -3720,6 +3720,7 @@ class NetworkdBondTests(unittest.TestCase, Utilities): output = check_output('ip -d link show bond199') print(output) self.assertRegex(output, 'primary dummy98') + self.assertIn('link/ether 00:11:22:33:44:55', output) def test_bond_operstate(self): copy_unit_to_networkd_unit_path('25-bond.netdev', '11-dummy.netdev', '12-dummy.netdev',