mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
test-network: add test for Property= in [Match] section
This commit is contained in:
parent
f706340979
commit
6b9518a0e8
@ -0,0 +1,6 @@
|
||||
[Match]
|
||||
Name=dummy98
|
||||
Property=INTERFACE=hoge
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=false
|
7
test/test-network/conf/14-match-udev-property.network
Normal file
7
test/test-network/conf/14-match-udev-property.network
Normal file
@ -0,0 +1,7 @@
|
||||
[Match]
|
||||
Name=dummy98
|
||||
Property=INTERFACE=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=false
|
||||
Address=10.1.2.3/16
|
@ -463,6 +463,8 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
'11-dummy.netdev',
|
||||
'11-dummy.network',
|
||||
'12-dummy.netdev',
|
||||
'13-not-match-udev-property.network',
|
||||
'14-match-udev-property.network',
|
||||
'15-name-conflict-test.netdev',
|
||||
'21-macvlan.netdev',
|
||||
'21-macvtap.netdev',
|
||||
@ -578,6 +580,15 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
print(output)
|
||||
self.assertRegex(output, '00:50:56:c0:00:28')
|
||||
|
||||
def test_match_udev_property(self):
|
||||
copy_unit_to_networkd_unit_path('12-dummy.netdev', '13-not-match-udev-property.network', '14-match-udev-property.network')
|
||||
start_networkd()
|
||||
wait_online(['dummy98:routable'])
|
||||
|
||||
output = check_output('networkctl status dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'Network File: /run/systemd/network/14-match-udev-property')
|
||||
|
||||
def test_wait_online_any(self):
|
||||
copy_unit_to_networkd_unit_path('25-bridge.netdev', '25-bridge.network', '11-dummy.netdev', '11-dummy.network')
|
||||
start_networkd()
|
||||
|
Loading…
Reference in New Issue
Block a user