Skip to content

Commit

Permalink
Tests: Restart systemd-journald instead of stop/start
Browse files Browse the repository at this point in the history
systemd-journald service by default is in running state.
The tests should restart the service after modifying configurations.

Signed-off-by: Kaushik Banerjee <[email protected]>
  • Loading branch information
kaushikub committed Aug 29, 2024
1 parent f4bf66d commit a4a9d8f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tests/multihost/alltests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a4a9d8f

Please sign in to comment.