test: clean up "dummy0" interface after each test case in networkd-test.py
authorMartin Pitt <martin.pitt@ubuntu.com>
Sun, 20 Nov 2016 09:08:23 +0000 (10:08 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sun, 20 Nov 2016 11:19:21 +0000 (12:19 +0100)
test/networkd-test.py

index 3091722..9767bd7 100755 (executable)
@@ -77,6 +77,8 @@ class ClientTestBase:
     def tearDown(self):
         self.shutdown_iface()
         subprocess.call(['systemctl', 'stop', 'systemd-networkd'])
+        subprocess.call(['ip', 'link', 'del', 'dummy0'],
+                        stderr=subprocess.DEVNULL)
 
     def writeConfig(self, fname, contents):
         os.makedirs(os.path.dirname(fname), exist_ok=True)