From 8e08bab437f9fca041d808feb84e6dca91fd3dea Mon Sep 17 00:00:00 2001 From: doobry Date: Sun, 24 Mar 2024 20:32:01 +0100 Subject: [PATCH] docs(tests): Update docs how to test `checkpassword` command --- docs/development/tests.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/development/tests.md b/docs/development/tests.md index b48ee0aa..585f4a10 100644 --- a/docs/development/tests.md +++ b/docs/development/tests.md @@ -8,6 +8,14 @@ ## Test checkpassword script + # Start vagrant box and login vagrant up && vagrant ssh - bin/console doctrine:schema:create -n && bin/console doctrine:fixture:load -n && exit - cd .. && tests/test_checkpassword_login.sh + # Create DB schema and load fixtures + bin/console doctrine:schema:create + bin/console doctrine:fixture:load + # Run `app:users:checkpassword` locally. First should return `0`, second `1` + echo -en 'user@example.org\0password' | ./bin/console app:users:checkpassword /bin/true; echo $? + echo -en 'user@example.org\0wrong' | ./bin/console app:users:checkpassword /bin/true; echo $? + # Logout from vagrant and test via IMAP login + exit + ./tests/test_checkpassword_login.sh