diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-28 04:28:10 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-28 04:35:28 +0200 |
commit | b4f4f1191e52a77c14efaffc9c5802c55e3c7185 (patch) | |
tree | ec27a63548a9a06ddcbd39ad7f5bc0c63e47b9ed | |
parent | network: make RouteTable= also accept route table name (diff) | |
download | systemd-b4f4f1191e52a77c14efaffc9c5802c55e3c7185.tar.xz systemd-b4f4f1191e52a77c14efaffc9c5802c55e3c7185.zip |
test-network: show only IPv4 routes
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 2f7614428c..3b559c8dec 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -2618,18 +2618,18 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): self.assertIn('anycast 149.10.123.2 proto static scope link', output) self.assertIn('broadcast 149.10.123.3 proto static scope link', output) - print('### ip route show type blackhole') - output = check_output('ip route show type blackhole') + print('### ip -4 route show type blackhole') + output = check_output('ip -4 route show type blackhole') print(output) self.assertIn('blackhole 202.54.1.2 proto static', output) - print('### ip route show type unreachable') - output = check_output('ip route show type unreachable') + print('### ip -4 route show type unreachable') + output = check_output('ip -4 route show type unreachable') print(output) self.assertIn('unreachable 202.54.1.3 proto static', output) - print('### ip route show type prohibit') - output = check_output('ip route show type prohibit') + print('### ip -4 route show type prohibit') + output = check_output('ip -4 route show type prohibit') print(output) self.assertIn('prohibit 202.54.1.4 proto static', output) @@ -2680,18 +2680,18 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): self.wait_online(['dummy98:routable']) # check all routes managed by Manager are removed - print('### ip route show type blackhole') - output = check_output('ip route show type blackhole') + print('### ip -4 route show type blackhole') + output = check_output('ip -4 route show type blackhole') print(output) self.assertEqual(output, '') - print('### ip route show type unreachable') - output = check_output('ip route show type unreachable') + print('### ip -4 route show type unreachable') + output = check_output('ip -4 route show type unreachable') print(output) self.assertEqual(output, '') - print('### ip route show type prohibit') - output = check_output('ip route show type prohibit') + print('### ip -4 route show type prohibit') + output = check_output('ip -4 route show type prohibit') print(output) self.assertEqual(output, '') @@ -2715,18 +2715,18 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): self.wait_online(['dummy98:routable']) # check all routes managed by Manager are reconfigured - print('### ip route show type blackhole') - output = check_output('ip route show type blackhole') + print('### ip -4 route show type blackhole') + output = check_output('ip -4 route show type blackhole') print(output) self.assertIn('blackhole 202.54.1.2 proto static', output) - print('### ip route show type unreachable') - output = check_output('ip route show type unreachable') + print('### ip -4 route show type unreachable') + output = check_output('ip -4 route show type unreachable') print(output) self.assertIn('unreachable 202.54.1.3 proto static', output) - print('### ip route show type prohibit') - output = check_output('ip route show type prohibit') + print('### ip -4 route show type prohibit') + output = check_output('ip -4 route show type prohibit') print(output) self.assertIn('prohibit 202.54.1.4 proto static', output) @@ -2749,18 +2749,18 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): time.sleep(2) # check all routes managed by Manager are removed - print('### ip route show type blackhole') - output = check_output('ip route show type blackhole') + print('### ip -4 route show type blackhole') + output = check_output('ip -4 route show type blackhole') print(output) self.assertEqual(output, '') - print('### ip route show type unreachable') - output = check_output('ip route show type unreachable') + print('### ip -4 route show type unreachable') + output = check_output('ip -4 route show type unreachable') print(output) self.assertEqual(output, '') - print('### ip route show type prohibit') - output = check_output('ip route show type prohibit') + print('### ip -4 route show type prohibit') + output = check_output('ip -4 route show type prohibit') print(output) self.assertEqual(output, '') |