TEST-54-CREDS: add test cases for credential refreshing

This commit is contained in:
Mike Yuan
2026-02-10 23:21:11 +01:00
parent d83f9cc112
commit 7d551b00e3
3 changed files with 132 additions and 0 deletions
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
# shellcheck disable=SC2016
set -eux
set -o pipefail
OUTPUT_FILE="$1"
dump_creds_tree() {
grep . "$CREDENTIALS_DIRECTORY"/* >"$OUTPUT_FILE"
}
on_sighup() {
systemd-notify --reloading
dump_creds_tree
systemd-notify --ready
}
trap on_sighup SIGHUP
export SYSTEMD_LOG_LEVEL=debug
dump_creds_tree
systemd-notify --ready
sleep infinity &
while :; do
wait || :
done