test: Reset systemd-resolved.service in networkd test

Like s-networkd.service itself, it can happen that s-resolved.service
runs into restart limits. Don't enforce a successful call, as on
machines without resolved the unit might not be loaded.
This commit is contained in:
Martin Pitt 2018-07-08 19:49:21 +02:00
parent 25ea58d373
commit 207f5f4d93
1 changed files with 2 additions and 2 deletions

View File

@ -177,7 +177,7 @@ Name=mybridge
DNS=192.168.250.1
Address=192.168.250.33/24
Gateway=192.168.250.1''')
subprocess.check_call(['systemctl', 'reset-failed', 'systemd-networkd'])
subprocess.call(['systemctl', 'reset-failed', 'systemd-networkd', 'systemd-resolved'])
subprocess.check_call(['systemctl', 'start', 'systemd-networkd'])
def tearDown(self):
@ -263,7 +263,7 @@ class ClientTestBase(NetworkdTestingUtilities):
self.assertTrue(out.startswith('-- cursor:'))
self.journal_cursor = out.split()[-1]
subprocess.check_call(['systemctl', 'reset-failed', 'systemd-networkd'])
subprocess.call(['systemctl', 'reset-failed', 'systemd-networkd', 'systemd-resolved'])
def tearDown(self):
self.shutdown_iface()