diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-09-24 19:54:15 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-09-24 19:54:15 +0200 |
commit | 58ead7415a3fe8d786bdb6fd2a99d0a57770dbd7 (patch) | |
tree | eacbad8eb616ca4fc1945b6048e433204fccfc69 /smoketest/scripts/cli/test_interfaces_wireless.py | |
parent | 4db00f1cd820f4fc462ce3537d692694224e02a4 (diff) | |
download | vyos-1x-58ead7415a3fe8d786bdb6fd2a99d0a57770dbd7.tar.gz vyos-1x-58ead7415a3fe8d786bdb6fd2a99d0a57770dbd7.zip |
smoketest: (re-)use process_named_running() from vyos.util
Diffstat (limited to 'smoketest/scripts/cli/test_interfaces_wireless.py')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_wireless.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_wireless.py b/smoketest/scripts/cli/test_interfaces_wireless.py index 691f633b7..0e93b6432 100755 --- a/smoketest/scripts/cli/test_interfaces_wireless.py +++ b/smoketest/scripts/cli/test_interfaces_wireless.py @@ -19,8 +19,7 @@ import re import unittest from base_interfaces_test import BasicInterfaceTest -from psutil import process_iter - +from vyos.util import process_named_running from vyos.util import check_kmod from vyos.util import read_file @@ -54,10 +53,10 @@ class WirelessInterfaceTest(BasicInterfaceTest.BaseTest): for option, option_value in self._options.items(): if 'type access-point' in option_value: # Check for running process - self.assertIn('hostapd', (p.name() for p in process_iter())) + self.assertTrue(process_named_running('hostapd')) elif 'type station' in option_value: # Check for running process - self.assertIn('wpa_supplicant', (p.name() for p in process_iter())) + self.assertTrue(process_named_running('wpa_supplicant')) else: self.assertTrue(False) @@ -137,8 +136,7 @@ class WirelessInterfaceTest(BasicInterfaceTest.BaseTest): self.assertIn(value, tmp) # Check for running process - self.assertIn('hostapd', (p.name() for p in process_iter())) - + self.assertTrue(process_named_running('hostapd')) if __name__ == '__main__': check_kmod('mac80211_hwsim') |