diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-08-17 11:06:42 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-08-17 11:06:42 +0000 |
commit | a2e1199c73ba94f67e3aa1da107be4538fb76560 (patch) | |
tree | 65889559302de88e437e78a6067dd2a7500d383e /smoketest/scripts | |
parent | 616bdb5299bf8252dfdab26f21a4b356cff6724e (diff) | |
download | vyos-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-x | smoketest/scripts/cli/test_service_dns_dynamic.py | 7 |
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) |