summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-08-17 11:06:42 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-08-17 11:06:42 +0000
commita2e1199c73ba94f67e3aa1da107be4538fb76560 (patch)
tree65889559302de88e437e78a6067dd2a7500d383e /smoketest/scripts
parent616bdb5299bf8252dfdab26f21a4b356cff6724e (diff)
downloadvyos-1x-a2e1199c73ba94f67e3aa1da107be4538fb76560.tar.gz
vyos-1x-a2e1199c73ba94f67e3aa1da107be4538fb76560.zip
T5486: smoketest: adjust to new process_named_running() implementation
After commit 9c677c8 ("vyos.util: extend process_named_running() signature with cmdline") we need an exact match for the process name. In the past we used a in b and now we test for a == b. Process name doesn't march 'ddclient' psutil.Process(pid=10987, name='ddclient - sleeping for 20 seconds', started='13:12:47' It cause smoketest fail
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_service_dns_dynamic.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/smoketest/scripts/cli/test_service_dns_dynamic.py b/smoketest/scripts/cli/test_service_dns_dynamic.py
index fd1bd055c..8ef28e70b 100755
--- a/smoketest/scripts/cli/test_service_dns_dynamic.py
+++ b/smoketest/scripts/cli/test_service_dns_dynamic.py
@@ -22,10 +22,11 @@ from base_vyostest_shim import VyOSUnitTestSHIM
from vyos.configsession import ConfigSessionError
from vyos.util import cmd
-from vyos.util import process_named_running
+from vyos.util import process_running
PROCESS_NAME = 'ddclient'
DDCLIENT_CONF = '/run/ddclient/ddclient.conf'
+DDCLIENT_PID = '/run/ddclient/ddclient.pid'
base_path = ['service', 'dns', 'dynamic']
def get_config_value(key):
@@ -89,7 +90,7 @@ class TestServiceDDNS(VyOSUnitTestSHIM.TestCase):
self.assertTrue(pwd == "'" + password + "'")
# Check for running process
- self.assertTrue(process_named_running(PROCESS_NAME))
+ self.assertTrue(process_running(DDCLIENT_PID))
def test_dyndns_rfc2136(self):
# Check if DDNS service can be configured and runs
@@ -119,7 +120,7 @@ class TestServiceDDNS(VyOSUnitTestSHIM.TestCase):
# TODO: inspect generated configuration file
# Check for running process
- self.assertTrue(process_named_running(PROCESS_NAME))
+ self.assertTrue(process_running(DDCLIENT_PID))
if __name__ == '__main__':
unittest.main(verbosity=2)