mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
test-network: try to change MAC address more
Follow-up for23b6bf274f
. (cherry picked from commitb448fc0a6f
)
This commit is contained in:
parent
306aa6caa1
commit
3cc124a513
@ -4,6 +4,3 @@ Name=bond199
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
|
||||
[Link]
|
||||
MACAddress=00:11:22:33:44:55
|
||||
|
@ -3799,7 +3799,7 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
|
||||
|
||||
output = check_output('ip -d link show bond199')
|
||||
print(output)
|
||||
self.assertRegex(output, 'active_slave dummy98')
|
||||
self.assertIn('active_slave dummy98', output)
|
||||
|
||||
def test_bond_primary_slave(self):
|
||||
copy_network_unit('23-primary-slave.network', '23-bond199.network', '25-bond-active-backup-slave.netdev', '12-dummy.netdev')
|
||||
@ -3808,8 +3808,20 @@ 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)
|
||||
self.assertIn('primary dummy98', output)
|
||||
|
||||
# for issue #25627
|
||||
mkdir_p(os.path.join(network_unit_dir, '23-bond199.network.d'))
|
||||
for mac in ['00:11:22:33:44:55', '00:11:22:33:44:56']:
|
||||
with open(os.path.join(network_unit_dir, '23-bond199.network.d/mac.conf'), mode='w', encoding='utf-8') as f:
|
||||
f.write(f'[Link]\nMACAddress={mac}\n')
|
||||
|
||||
networkctl_reload()
|
||||
self.wait_online(['dummy98:enslaved', 'bond199:degraded'])
|
||||
|
||||
output = check_output('ip -d link show bond199')
|
||||
print(output)
|
||||
self.assertIn(f'link/ether {mac}', output)
|
||||
|
||||
def test_bond_operstate(self):
|
||||
copy_network_unit('25-bond.netdev', '11-dummy.netdev', '12-dummy.netdev',
|
||||
|
Loading…
Reference in New Issue
Block a user