]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: check route more strictly
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 3 Jul 2023 07:03:50 +0000 (16:03 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 3 Jul 2023 07:06:17 +0000 (16:06 +0900)
test/test-network/systemd-networkd-tests.py

index 9f55456fa4becb6d581274e811fbd3f47a0330bb..1d426ee9798f254a4bfea2ded94b18a747ab81cb 100755 (executable)
@@ -2973,9 +2973,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         output = check_output('ip -6 route list dev bond199')
         print(output)
-        self.assertRegex(output, 'abcd::/16')
-        self.assertRegex(output, 'src')
-        self.assertRegex(output, '2001:1234:56:8f63::2')
+        self.assertIn('abcd::/16 via 2001:1234:56:8f63::1:1 proto static src 2001:1234:56:8f63::2', output)
 
     def test_ip_link_mac_address(self):
         copy_network_unit('25-address-link-section.network', '12-dummy.netdev')