mirror of
https://github.com/systemd/systemd.git
synced 2025-01-24 06:04:05 +03:00
test-network: find routing policy rule by priority
We usually configure a test rule with a unique priority. Hence, finding rule by priority reduces the lines of output, and we can debug easily. Also print short comments on check. That's helpful when the check is called several times.
This commit is contained in:
parent
04d10fdb1d
commit
462be8c957
@ -3211,6 +3211,8 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, routable_map[carrier])
|
||||
|
||||
def check_routing_policy_rule_test1(self):
|
||||
print('### Checking routing policy rules requested by test1')
|
||||
|
||||
output = check_output('ip rule list iif test1 priority 111')
|
||||
print(output)
|
||||
self.assertRegex(output, r'111: from 192.168.100.18 tos (0x08|throughput) iif test1 oif test1 lookup 7')
|
||||
@ -3236,7 +3238,9 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
self.assertIn('104: from 10.1.0.0/16 iif test1 lookup 12 nop', output)
|
||||
|
||||
def check_routing_policy_rule_dummy98(self):
|
||||
output = check_output('ip rule list table 8')
|
||||
print('### Checking routing policy rules requested by dummy98')
|
||||
|
||||
output = check_output('ip rule list priority 112')
|
||||
print(output)
|
||||
self.assertRegex(output, r'112: from 192.168.101.18 tos (0x08|throughput) iif dummy98 oif dummy98 lookup 8')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user