1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00

test-network: move one test case

This commit is contained in:
Yu Watanabe 2022-12-22 16:27:58 +09:00
parent ab3aed4a03
commit 5432adae82

View File

@ -1136,6 +1136,15 @@ class NetworkdMatchTests(unittest.TestCase, Utilities):
output = check_output(*networkctl_cmd, '-n', '0', 'status', 'dummy98-2', env=env) output = check_output(*networkctl_cmd, '-n', '0', 'status', 'dummy98-2', env=env)
self.assertIn('Network File: /run/systemd/network/12-dummy-match-altname.network', output) self.assertIn('Network File: /run/systemd/network/12-dummy-match-altname.network', output)
def test_match_udev_property(self):
copy_network_unit('12-dummy.netdev', '13-not-match-udev-property.network', '14-match-udev-property.network')
start_networkd()
self.wait_online(['dummy98:routable'])
output = check_output(*networkctl_cmd, '-n', '0', 'status', 'dummy98', env=env)
print(output)
self.assertRegex(output, 'Network File: /run/systemd/network/14-match-udev-property')
class NetworkdNetDevTests(unittest.TestCase, Utilities): class NetworkdNetDevTests(unittest.TestCase, Utilities):
def setUp(self): def setUp(self):
@ -1154,15 +1163,6 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
print(output) print(output)
self.assertRegex(output, '00:50:56:c0:00:28') self.assertRegex(output, '00:50:56:c0:00:28')
def test_match_udev_property(self):
copy_network_unit('12-dummy.netdev', '13-not-match-udev-property.network', '14-match-udev-property.network')
start_networkd()
self.wait_online(['dummy98:routable'])
output = check_output(*networkctl_cmd, '-n', '0', 'status', 'dummy98', env=env)
print(output)
self.assertRegex(output, 'Network File: /run/systemd/network/14-match-udev-property')
def test_wait_online_any(self): def test_wait_online_any(self):
copy_network_unit('25-bridge.netdev', '25-bridge.network', '11-dummy.netdev', '11-dummy.network') copy_network_unit('25-bridge.netdev', '25-bridge.network', '11-dummy.netdev', '11-dummy.network')
start_networkd() start_networkd()