From a2e1199c73ba94f67e3aa1da107be4538fb76560 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Thu, 17 Aug 2023 11:06:42 +0000 Subject: 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 --- smoketest/scripts/cli/test_service_dns_dynamic.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'smoketest/scripts/cli/test_service_dns_dynamic.py') 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) -- cgit v1.2.3