diff options
Diffstat (limited to 'test/units')
-rwxr-xr-x | test/units/TEST-74-AUX-UTILS.sysusers.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/units/TEST-74-AUX-UTILS.sysusers.sh b/test/units/TEST-74-AUX-UTILS.sysusers.sh index dcd29938b5..2a06e85bfd 100755 --- a/test/units/TEST-74-AUX-UTILS.sysusers.sh +++ b/test/units/TEST-74-AUX-UTILS.sysusers.sh @@ -6,6 +6,17 @@ set -o pipefail # shellcheck source=test/units/util.sh . "$(dirname "$0")"/util.sh +systemd-sysusers - <<EOF +u unlockedtestuser - "An unlocked system user" / /bin/bash +u! lockedtestuser - "A locked system user" / /bin/bash +EOF + +userdbctl -j user unlockedtestuser +userdbctl -j user lockedtestuser + +assert_eq "$(userdbctl -j user unlockedtestuser | jq .locked)" "null" +assert_eq "$(userdbctl -j user lockedtestuser | jq .locked)" "true" + at_exit() { set +e userdel -r foobarbaz |