summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2024-12-19 08:54:19 -0600
committerIndrajit Raychaudhuri <irc@indrajit.com>2024-12-19 08:56:42 -0600
commitc2d84b03d6fad1795349d357ee301f02aa645dc0 (patch)
tree2f82264c5cfa1f2ae04b264cfef0d85cc5f8b508 /smoketest
parentfdb9ce311ae485bcdaa59c5653c631df7efd3e29 (diff)
downloadvyos-1x-c2d84b03d6fad1795349d357ee301f02aa645dc0.tar.gz
vyos-1x-c2d84b03d6fad1795349d357ee301f02aa645dc0.zip
T5791: Modify ddclient smoketest for reliability
Instead of checking for the existence of a PID file, check if the process is running by name.
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_service_dns_dynamic.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/smoketest/scripts/cli/test_service_dns_dynamic.py b/smoketest/scripts/cli/test_service_dns_dynamic.py
index c39d4467a..3e14976fc 100755
--- a/smoketest/scripts/cli/test_service_dns_dynamic.py
+++ b/smoketest/scripts/cli/test_service_dns_dynamic.py
@@ -22,11 +22,10 @@ from base_vyostest_shim import VyOSUnitTestSHIM
from vyos.configsession import ConfigSessionError
from vyos.utils.process import cmd
-from vyos.utils.process import process_running
+from vyos.utils.process import process_named_running
DDCLIENT_SYSTEMD_UNIT = '/run/systemd/system/ddclient.service.d/override.conf'
DDCLIENT_CONF = '/run/ddclient/ddclient.conf'
-DDCLIENT_PID = '/run/ddclient/ddclient.pid'
DDCLIENT_PNAME = 'ddclient'
base_path = ['service', 'dns', 'dynamic']
@@ -46,14 +45,14 @@ class TestServiceDDNS(VyOSUnitTestSHIM.TestCase):
def tearDown(self):
# Check for running process
- self.assertTrue(process_running(DDCLIENT_PID))
+ self.assertTrue(process_named_running(DDCLIENT_PNAME))
# Delete DDNS configuration
self.cli_delete(base_path)
self.cli_commit()
- # PID file must no londer exist after process exited
- self.assertFalse(os.path.exists(DDCLIENT_PID))
+ # Check for process not running anymore
+ self.assertFalse(process_named_running(DDCLIENT_PNAME))
# IPv4 standard DDNS service configuration
def test_01_dyndns_service_standard(self):