1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

test-network: drop redundant check_link_exists()

When wait_online() passes, then the link must exist.
This commit is contained in:
Yu Watanabe 2019-05-23 23:45:49 +09:00
parent 4450894653
commit b08b056e19

View File

@ -410,8 +410,6 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
self.start_networkd(0)
self.wait_online(['bridge99', 'test1:degraded'], bool_any=True)
self.check_link_exists('bridge99')
self.check_link_exists('test1')
self.check_operstate('bridge99', '(?:off|no-carrier)', setup_state='configuring')
self.check_operstate('test1', 'degraded')
@ -842,9 +840,6 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
self.start_networkd(0)
self.wait_online(['isataptun99:routable', 'dummy98:degraded'])
self.check_link_exists('dummy98')
self.check_link_exists('isataptun99')
output = subprocess.check_output(['ip', '-d', 'link', 'show', 'isataptun99'], universal_newlines=True).rstrip()
print(output)
self.assertRegex(output, "isatap ")
@ -1400,8 +1395,6 @@ class NetworkdNetWorkTests(unittest.TestCase, Utilities):
self.start_networkd(0)
self.wait_online(['dummy98:degraded'])
self.check_link_exists('dummy98')
self.assertEqual(self.read_ipv6_sysctl_attr('dummy98', 'forwarding'), '1')
self.assertEqual(self.read_ipv6_sysctl_attr('dummy98', 'use_tempaddr'), '2')
self.assertEqual(self.read_ipv6_sysctl_attr('dummy98', 'dad_transmits'), '3')
@ -1420,8 +1413,6 @@ class NetworkdNetWorkTests(unittest.TestCase, Utilities):
self.start_networkd(0)
self.wait_online(['dummy98:routable'])
self.check_link_exists('dummy98')
output = subprocess.check_output(['ip', '-4', 'address', 'show', 'dummy98'], universal_newlines=True).rstrip()
print(output)
self.assertRegex(output, 'inet 10.2.3.4/16 brd 10.2.255.255 scope global dummy98')
@ -1439,8 +1430,6 @@ class NetworkdNetWorkTests(unittest.TestCase, Utilities):
self.start_networkd(0)
self.wait_online(['dummy98:routable'])
self.check_link_exists('dummy98')
output = subprocess.check_output(['ip', '-4', 'address', 'show', 'dummy98'], universal_newlines=True).rstrip()
print(output)
self.assertRegex(output, 'inet 10.2.3.4/16 brd 10.2.255.255 scope global dummy98')