summaryrefslogtreecommitdiffstats
path: root/pw/tests/pw_lock_test.sh
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-02-10 18:13:31 -0500
committerCameron Katri <me@cameronkatri.com>2021-02-10 19:00:38 -0500
commit9768b265bd097e561103188bb97f64ef26c6cee1 (patch)
treed31efcee098e5f18f411f72c26782ebfe53523b5 /pw/tests/pw_lock_test.sh
parentec831d9055a20b69cb9a7300990b8e4414cbd474 (diff)
downloadpw-darwin-9768b265bd097e561103188bb97f64ef26c6cee1.tar.gz
pw-darwin-9768b265bd097e561103188bb97f64ef26c6cee1.tar.zst
pw-darwin-9768b265bd097e561103188bb97f64ef26c6cee1.zip
New Makefile, freebsd reallocarray.c, freebsd strtonum for 12/13 compat, delete tests
Diffstat (limited to 'pw/tests/pw_lock_test.sh')
-rwxr-xr-xpw/tests/pw_lock_test.sh42
1 files changed, 0 insertions, 42 deletions
diff --git a/pw/tests/pw_lock_test.sh b/pw/tests/pw_lock_test.sh
deleted file mode 100755
index 5ec1b09..0000000
--- a/pw/tests/pw_lock_test.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-# $FreeBSD$
-
-# Import helper functions
-. $(atf_get_srcdir)/helper_functions.shin
-
-# Test locking and unlocking a user account
-atf_test_case user_locking cleanup
-user_locking_body() {
- populate_etc_skel
- ${PW} useradd test || atf_fail "Creating test user"
- ${PW} lock test || atf_fail "Locking the user"
- atf_check -s exit:0 -o match:"^test:\*LOCKED\*\*:1001:" \
- grep "^test:\*LOCKED\*\*:1001:" $HOME/master.passwd
- ${PW} unlock test || atf_fail "Locking the user"
- atf_check -s exit:0 -o match:"^test:\*:1001:" \
- grep "^test:\*:1001:" $HOME/master.passwd
-}
-
-atf_test_case numeric_locking cleanup
-numeric_locking_body() {
- populate_etc_skel
- ${PW} useradd test || atf_fail "Creating test user"
- ${PW} lock 1001 || atf_fail "Locking the user"
- atf_check -s exit:0 -o match:"^test:\*LOCKED\*\*:1001:" \
- grep "^test:\*LOCKED\*\*:1001:" $HOME/master.passwd
- ${PW} unlock 1001 || atf_fail "Unlocking the user"
- atf_check -s exit:0 -o match:"^test:\*:1001:" \
- grep "^test:\*:1001:" $HOME/master.passwd
- # Now numeric names
- ${PW} useradd -n 1001 || atf_fail "Creating test user"
- ${PW} lock 1001 || atf_fail "Locking the user"
- atf_check -s exit:0 -o match:"^1001:\*LOCKED\*\*:1002:" \
- grep "^1001:\*LOCKED\*\*:1002:" $HOME/master.passwd
- ${PW} unlock 1001 || atf_fail "Unlocking the user"
- atf_check -s exit:0 -o match:"^1001:\*:1002:" \
- grep "^1001:\*:1002:" $HOME/master.passwd
-}
-
-atf_init_test_cases() {
- atf_add_test_case user_locking
- atf_add_test_case numeric_locking
-}