test: Reset systemd-resolved.service in networkd test
authorMartin Pitt <martin@piware.de>
Sun, 8 Jul 2018 17:49:21 +0000 (19:49 +0200)
committerMartin Pitt <martin@piware.de>
Mon, 9 Jul 2018 14:42:32 +0000 (16:42 +0200)
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.

test/networkd-test.py

index de16ac1..5ec670a 100755 (executable)
@@ -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()