mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
test-network: add tests for "networkctl reload"
This commit is contained in:
parent
a227674cfb
commit
66de86712c
@ -401,6 +401,32 @@ class NetworkctlTests(unittest.TestCase, Utilities):
|
|||||||
remove_unit_from_networkd_path(self.units)
|
remove_unit_from_networkd_path(self.units)
|
||||||
stop_networkd(show_logs=True)
|
stop_networkd(show_logs=True)
|
||||||
|
|
||||||
|
def test_reload(self):
|
||||||
|
start_networkd(3)
|
||||||
|
|
||||||
|
copy_unit_to_networkd_unit_path('11-dummy.netdev')
|
||||||
|
check_output(*networkctl_cmd, 'reload', env=env)
|
||||||
|
time.sleep(3)
|
||||||
|
self.check_link_exists('test1')
|
||||||
|
self.check_operstate('test1', 'off', setup_state='unmanaged')
|
||||||
|
|
||||||
|
copy_unit_to_networkd_unit_path('11-dummy.network')
|
||||||
|
check_output(*networkctl_cmd, 'reload', env=env)
|
||||||
|
self.wait_online(['test1:degraded'])
|
||||||
|
|
||||||
|
remove_unit_from_networkd_path(['11-dummy.network'])
|
||||||
|
check_output(*networkctl_cmd, 'reload', env=env)
|
||||||
|
time.sleep(1)
|
||||||
|
self.check_operstate('test1', 'degraded', setup_state='unmanaged')
|
||||||
|
|
||||||
|
remove_unit_from_networkd_path(['11-dummy.netdev'])
|
||||||
|
check_output(*networkctl_cmd, 'reload', env=env)
|
||||||
|
self.check_operstate('test1', 'degraded', setup_state='unmanaged')
|
||||||
|
|
||||||
|
copy_unit_to_networkd_unit_path('11-dummy.netdev', '11-dummy.network')
|
||||||
|
check_output(*networkctl_cmd, 'reload', env=env)
|
||||||
|
self.check_operstate('test1', 'degraded')
|
||||||
|
|
||||||
def test_glob(self):
|
def test_glob(self):
|
||||||
copy_unit_to_networkd_unit_path('11-dummy.netdev', '11-dummy.network')
|
copy_unit_to_networkd_unit_path('11-dummy.netdev', '11-dummy.network')
|
||||||
start_networkd()
|
start_networkd()
|
||||||
|
Loading…
Reference in New Issue
Block a user