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_macsec.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_macsec.py')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_macsec.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_macsec.py b/smoketest/scripts/cli/test_interfaces_macsec.py index fab5433de..6d1be86ba 100755 --- a/smoketest/scripts/cli/test_interfaces_macsec.py +++ b/smoketest/scripts/cli/test_interfaces_macsec.py @@ -17,13 +17,13 @@ import re import unittest -from psutil import process_iter from base_interfaces_test import BasicInterfaceTest from netifaces import interfaces -from vyos.ifconfig import Section from vyos.configsession import ConfigSessionError +from vyos.ifconfig import Section from vyos.util import read_file +from vyos.util import process_named_running def get_config_value(interface, key): tmp = read_file(f'/run/wpa_supplicant/{interface}.conf') @@ -103,7 +103,7 @@ class MACsecInterfaceTest(BasicInterfaceTest.BaseTest): self.assertEqual(tmp, '1460') # Check for running process - self.assertTrue("wpa_supplicant" in (p.name() for p in process_iter())) + self.assertTrue(process_named_running('wpa_supplicant')) def test_mandatory_toptions(self): interface = 'macsec1' |