mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Add script to run integration tests
This commit is contained in:
parent
057742d4af
commit
956399a1ea
1 changed files with 20 additions and 0 deletions
20
scripts/run_integration_tests.sh
Executable file
20
scripts/run_integration_tests.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This is ugly, but older versions of git don't support the GIT_CONFIG_GLOBAL
|
||||
# env var; the only way to run tests for these old versions is to copy our test
|
||||
# config file to the actual global location. Move an existing file out of the
|
||||
# way so that we can restore it at the end.
|
||||
if test -f ~/.gitconfig; then
|
||||
mv ~/.gitconfig ~/.gitconfig.lazygit.bak
|
||||
fi
|
||||
|
||||
cp test/global_git_config ~/.gitconfig
|
||||
|
||||
go test pkg/integration/clients/*.go
|
||||
EXITCODE=$?
|
||||
|
||||
if test -f ~/.gitconfig.lazygit.bak; then
|
||||
mv ~/.gitconfig.lazygit.bak ~/.gitconfig
|
||||
fi
|
||||
|
||||
exit $EXITCODE
|
Loading…
Add table
Add a link
Reference in a new issue