summaryrefslogtreecommitdiff
path: root/test/test-network/systemd-networkd-tests.py
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-08-21 15:27:35 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-08-21 15:27:38 +0900
commit9dffe6fc2713c3d6fd69419d7b5476ccb15a8dcf (patch)
tree8141bdeafa44cd143c4575827f8d4477e8582d4c /test/test-network/systemd-networkd-tests.py
parent990307c3da61b16c57d958910295b96ea6aa2a5e (diff)
downloadsystemd-9dffe6fc2713c3d6fd69419d7b5476ccb15a8dcf.tar.gz
test-network: add a test case for reconfiguring routing policy rules
C.f. #16784.
Diffstat (limited to 'test/test-network/systemd-networkd-tests.py')
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 0ca1fb3bf9..f12917cdd9 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -1976,6 +1976,25 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'iif test1')
self.assertRegex(output, 'lookup 9')
+ run('ip rule delete iif test1 priority 111')
+
+ output = check_output('ip rule list iif test1 priority 111')
+ print(output)
+ self.assertEqual(output, '')
+
+ run(*networkctl_cmd, 'reconfigure', 'test1', env=env)
+
+ self.wait_online(['test1:degraded'])
+
+ output = check_output('ip rule list iif test1 priority 111')
+ print(output)
+ self.assertRegex(output, '111:')
+ self.assertRegex(output, 'from 192.168.100.18')
+ self.assertRegex(output, r'tos (0x08|throughput)\s')
+ self.assertRegex(output, 'iif test1')
+ self.assertRegex(output, 'oif test1')
+ self.assertRegex(output, 'lookup 7')
+
def test_routing_policy_rule_issue_11280(self):
copy_unit_to_networkd_unit_path('routing-policy-rule-test1.network', '11-dummy.netdev',
'routing-policy-rule-dummy98.network', '12-dummy.netdev')