3 # Import helper functions
4 . $(atf_get_srcdir)/helper_functions.shin
6 # Test locking and unlocking a user account
7 atf_test_case user_locking cleanup
10 ${PW} useradd test || atf_fail "Creating test user"
11 ${PW} lock test || atf_fail "Locking the user"
12 atf_check -s exit:0 -o match:"^test:\*LOCKED\*\*:1001:" \
13 grep "^test:\*LOCKED\*\*:1001:" $HOME/master.passwd
14 ${PW} unlock test || atf_fail "Locking the user"
15 atf_check -s exit:0 -o match:"^test:\*:1001:" \
16 grep "^test:\*:1001:" $HOME/master.passwd
20 atf_init_test_cases() {
21 atf_add_test_case user_locking