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_vpn_openconnect.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_vpn_openconnect.py')
-rwxr-xr-x | smoketest/scripts/cli/test_vpn_openconnect.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/smoketest/scripts/cli/test_vpn_openconnect.py b/smoketest/scripts/cli/test_vpn_openconnect.py index d2b82d686..2ba6aabf9 100755 --- a/smoketest/scripts/cli/test_vpn_openconnect.py +++ b/smoketest/scripts/cli/test_vpn_openconnect.py @@ -14,13 +14,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import re import os import unittest -from psutil import process_iter -from vyos.configsession import ConfigSession, ConfigSessionError -from vyos.util import read_file +from vyos.configsession import ConfigSession +from vyos.util import process_named_running OCSERV_CONF = '/run/ocserv/ocserv.conf' base_path = ['vpn', 'openconnect'] @@ -52,7 +50,7 @@ class TestVpnOpenconnect(unittest.TestCase): self.session.commit() # Check for running process - self.assertTrue("ocserv-main" in (p.name() for p in process_iter())) + self.assertTrue(process_named_running('ocserv-main')) if __name__ == '__main__': unittest.main() |