TEST-46-HOMED: fix 2 minute timeout in cleanup
The test passes but for two minutes the cleanup function just logs: Failed to inspect home: No home for user homedsshtest known Failed to inspect home: No home for user homedsshtest known Failed to inspect home: No home for user homedsshtest known ... Do not wait for the user to become inactive or remove the user if 'homectl inspect' doesn't find the user. This brings a successfull run from 176 s to 58 s here.
This commit is contained in:
@@ -578,8 +578,10 @@ cleanup_ssh() (
|
||||
systemctl is-active -q mysshserver.socket && systemctl stop mysshserver.socket
|
||||
rm -f /tmp/homed.id_ecdsa /run/systemd/system/mysshserver{@.service,.socket}
|
||||
systemctl daemon-reload
|
||||
wait_for_state homedsshtest inactive
|
||||
homectl remove homedsshtest
|
||||
if homectl inspect homedsshtest &>/dev/null; then
|
||||
wait_for_state homedsshtest inactive
|
||||
homectl remove homedsshtest
|
||||
fi
|
||||
for dir in /etc /usr/lib; do
|
||||
if [[ -f "$dir/pam.d/sshd.bak" ]]; then
|
||||
mv "$dir/pam.d/sshd.bak" "$dir/pam.d/sshd"
|
||||
|
||||
Reference in New Issue
Block a user