test-network: add tests for invalid Address sections

This commit is contained in:
Yu Watanabe
2019-03-13 11:59:18 +09:00
parent 96db641250
commit bbb5aebe3e
2 changed files with 20 additions and 0 deletions
@@ -813,6 +813,9 @@ class NetworkdNetWorkTests(unittest.TestCase, Utilities):
print(output)
self.assertRegex(output, 'inet 10.2.3.4/16 brd 10.2.255.255 scope link deprecated dummy98')
self.assertRegex(output, 'inet6 2001:db8:0:f101::1/64 scope global')
# also tests invalid [Address] section
self.assertNotRegex(output, '10.10.0.1/16')
self.assertNotRegex(output, '10.10.0.2/16')
def test_ip_route(self):
self.copy_unit_to_networkd_unit_path('25-route-section.network', '12-dummy.netdev')