Skip to content

Commit 5ad5807

Browse files
yuwatabluca
authored andcommitted
test-network: add testcase for no managed interface
(cherry picked from commit 56dfde0)
1 parent 8c9b36f commit 5ad5807

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/test-network/systemd-networkd-tests.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ def wait_online(self, links_with_operstate, timeout='20s', bool_any=False, ipv4=
867867
This returns if the links reached the requested operstate/setup_state; otherwise it
868868
raises CalledProcessError or fails test assertion.
869869
"""
870-
args = wait_online_cmd + [f'--timeout={timeout}'] + [f'--interface={link}' for link in links_with_operstate]
870+
args = wait_online_cmd + [f'--timeout={timeout}'] + [f'--interface={link}' for link in links_with_operstate] + [f'--ignore={link}' for link in protected_links]
871871
if bool_any:
872872
args += ['--any']
873873
if ipv4:
@@ -1103,6 +1103,10 @@ def setUp(self):
11031103
def tearDown(self):
11041104
tear_down_common()
11051105

1106+
def test_wait_online_all_unmanaged(self):
1107+
start_networkd()
1108+
self.wait_online([])
1109+
11061110
def test_wait_online_any(self):
11071111
copy_network_unit('25-bridge.netdev', '25-bridge.network', '11-dummy.netdev', '11-dummy.network')
11081112
start_networkd()

0 commit comments

Comments
 (0)