mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
test-network: check if networkd forgets routes silently removed by the kernel
This commit is contained in:
@@ -4082,7 +4082,9 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
self.assertIn('nexthop via 192.168.5.3 dev veth99 weight 3', output)
|
||||
self.assertIn('nexthop via 192.168.20.1 dev dummy98 weight 1', output)
|
||||
|
||||
check_json(networkctl_json())
|
||||
output = networkctl_json()
|
||||
check_json(output)
|
||||
self.assertNotIn('"Destination":[10.10.10.14]', output)
|
||||
|
||||
def _test_nexthop(self, manage_foreign_nexthops):
|
||||
if not manage_foreign_nexthops:
|
||||
@@ -4141,6 +4143,11 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
output = networkctl_status('test1')
|
||||
self.assertIn('State: routable (configuring)', output)
|
||||
|
||||
# Check if the route which needs nexthop 20 and 21 are forgotten.
|
||||
output = networkctl_json()
|
||||
check_json(output)
|
||||
self.assertNotIn('"Destination":[10.10.10.14]', output)
|
||||
|
||||
# Reconfigure the interface that has nexthop with ID 20 and 21,
|
||||
# then the route requested by test1 can be configured.
|
||||
networkctl_reconfigure('dummy98')
|
||||
|
||||
Reference in New Issue
Block a user