From: Yu Watanabe Date: Thu, 22 Dec 2022 07:29:20 +0000 (+0900) Subject: test-network: split out wait-online related test case X-Git-Tag: v253-rc1~222^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b09ec84700d4a645e047e156284ada54fe8b6d7d;p=thirdparty%2Fsystemd.git test-network: split out wait-online related test case --- diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 37705d8c729..78ec047e520 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -1145,6 +1145,23 @@ class NetworkdMatchTests(unittest.TestCase, Utilities): print(output) self.assertRegex(output, 'Network File: /run/systemd/network/14-match-udev-property') +class WaitOnlineTests(unittest.TestCase, Utilities): + + def setUp(self): + setup_common() + + def tearDown(self): + tear_down_common() + + def test_wait_online_any(self): + copy_network_unit('25-bridge.netdev', '25-bridge.network', '11-dummy.netdev', '11-dummy.network') + start_networkd() + + self.wait_online(['bridge99', 'test1:degraded'], bool_any=True) + + self.wait_operstate('bridge99', '(off|no-carrier)', setup_state='configuring') + self.wait_operstate('test1', 'degraded') + class NetworkdNetDevTests(unittest.TestCase, Utilities): def setUp(self): @@ -1163,15 +1180,6 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): print(output) self.assertRegex(output, '00:50:56:c0:00:28') - def test_wait_online_any(self): - copy_network_unit('25-bridge.netdev', '25-bridge.network', '11-dummy.netdev', '11-dummy.network') - start_networkd() - - self.wait_online(['bridge99', 'test1:degraded'], bool_any=True) - - self.wait_operstate('bridge99', '(off|no-carrier)', setup_state='configuring') - self.wait_operstate('test1', 'degraded') - @expectedFailureIfModuleIsNotAvailable('bareudp') def test_bareudp(self): copy_network_unit('25-bareudp.netdev', '26-netdev-link-local-addressing-yes.network')