summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_service_pppoe-server.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-09-24 19:54:15 +0200
committerChristian Poessinger <christian@poessinger.com>2020-09-24 19:54:15 +0200
commit58ead7415a3fe8d786bdb6fd2a99d0a57770dbd7 (patch)
treeeacbad8eb616ca4fc1945b6048e433204fccfc69 /smoketest/scripts/cli/test_service_pppoe-server.py
parent4db00f1cd820f4fc462ce3537d692694224e02a4 (diff)
downloadvyos-1x-58ead7415a3fe8d786bdb6fd2a99d0a57770dbd7.tar.gz
vyos-1x-58ead7415a3fe8d786bdb6fd2a99d0a57770dbd7.zip
smoketest: (re-)use process_named_running() from vyos.util
Diffstat (limited to 'smoketest/scripts/cli/test_service_pppoe-server.py')
-rwxr-xr-xsmoketest/scripts/cli/test_service_pppoe-server.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_service_pppoe-server.py b/smoketest/scripts/cli/test_service_pppoe-server.py
index 901ca792d..3a6b12ef4 100755
--- a/smoketest/scripts/cli/test_service_pppoe-server.py
+++ b/smoketest/scripts/cli/test_service_pppoe-server.py
@@ -14,15 +14,15 @@
# 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 configparser import ConfigParser
-from psutil import process_iter
from vyos.configsession import ConfigSession
from vyos.configsession import ConfigSessionError
+from vyos.util import process_named_running
+process_name = 'accel-pppd'
base_path = ['service', 'pppoe-server']
local_if = ['interfaces', 'dummy', 'dum667']
pppoe_conf = '/run/accel-pppd/pppoe.conf'
@@ -116,7 +116,7 @@ class TestServicePPPoEServer(unittest.TestCase):
self.assertEqual(conf['connlimit']['limit'], '20/min')
# Check for running process
- self.assertTrue('accel-pppd' in (p.name() for p in process_iter()))
+ self.assertTrue(process_named_running(process_name))
def test_radius_auth(self):
""" Test configuration of RADIUS authentication for PPPoE server """
@@ -161,7 +161,7 @@ class TestServicePPPoEServer(unittest.TestCase):
self.assertFalse(conf['ppp'].getboolean('ccp'))
# Check for running process
- self.assertTrue('accel-pppd' in (p.name() for p in process_iter()))
+ self.assertTrue(process_named_running(process_name))
if __name__ == '__main__':
unittest.main()