1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

cleanup integration test code

This commit is contained in:
Jesse Duffield
2023-02-26 11:49:15 +11:00
parent 8b5d59c238
commit f7e8b2dd71
70 changed files with 322 additions and 272 deletions

27
test/files/pre-push Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
# test pre-push hook for testing the lazygit credentials view
#
# to enable, use:
# chmod +x .git/hooks/pre-push
#
# this will hang if you're using git from the command line, so only enable this
# when you are testing the credentials view in lazygit
exec < /dev/tty
echo -n "Username for 'github': "
read username
echo -n "Password for 'github': "
# this will print the password to the log view but real git won't do that.
# We could use read -s but that's not POSIX compliant.
read password
if [ "$username" = "username" -a "$password" = "password" ]; then
echo "success"
exit 0
fi
>&2 echo "incorrect username/password"
exit 1