From 0f351c2bb3d2287d382a9f9f2724bd262c8a60e0 Mon Sep 17 00:00:00 2001 From: Kaushik Banerjee Date: Thu, 29 Aug 2024 14:12:18 +0530 Subject: [PATCH] Tests: Restart systemd-journald instead of stop/start systemd-journald service by default is in running state. The tests should restart the service after modifying configurations. Signed-off-by: Kaushik Banerjee Reviewed-by: Anuj Borah --- src/tests/multihost/alltests/conftest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/multihost/alltests/conftest.py b/src/tests/multihost/alltests/conftest.py index a0b610dae25..beed59a9d45 100644 --- a/src/tests/multihost/alltests/conftest.py +++ b/src/tests/multihost/alltests/conftest.py @@ -1191,16 +1191,16 @@ def write_journalsssd(session_multihost, request): contents = "DEBUG_LOGGER=--logger=journald" session_multihost.client[0].put_file_contents('/etc/sysconfig/sssd', contents) - start_journald = 'systemctl start systemd-journald' - session_multihost.client[0].run_command(start_journald) + restart_journald = 'systemctl restart systemd-journald' + session_multihost.client[0].run_command(restart_journald) def remove_journalsssd(): """ Remove /etc/sysconfig/sssd""" cmd = 'rm -f /etc/sysconfig/sssd' - stop_journald = 'systemctl stop systemd-journald' + restart_journald = 'systemctl restart systemd-journald' restart_sssd = 'systemctl restart sssd' session_multihost.client[0].run_command(cmd) - session_multihost.client[0].run_command(stop_journald) + session_multihost.client[0].run_command(restart_journald) session_multihost.client[0].run_command(restart_sssd) request.addfinalizer(remove_journalsssd)