test: replace stop+start by restart
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 3 Oct 2018 05:16:24 +0000 (14:16 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 3 Oct 2018 05:36:34 +0000 (14:36 +0900)
This suppress the following warnings:
```
Warning: Stopping systemd-networkd.service, but it can still be activated by:
  systemd-networkd.socket
```

test/test-network/systemd-networkd-tests.py

index 760310a..043fdac 100755 (executable)
@@ -99,9 +99,7 @@ class Utilities():
             os.remove(dnsmasq_log_file)
 
     def start_networkd(self):
-        subprocess.check_call('systemctl stop systemd-networkd', shell=True)
-        time.sleep(1)
-        subprocess.check_call('systemctl start systemd-networkd', shell=True)
+        subprocess.check_call('systemctl restart systemd-networkd', shell=True)
         time.sleep(5)
 
 global ip