diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2023-07-02 11:31:06 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2023-07-10 15:09:17 +0200 |
commit | 956399a1ea3806e70f33a6b36a6e670c94999e2e (patch) | |
tree | 4b7e5187c4a9204dfba809a372826a5ae9ecd72d /scripts | |
parent | 057742d4af3c8e6f632663e8ca286b75c768492c (diff) |
Add script to run integration tests
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/run_integration_tests.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/run_integration_tests.sh b/scripts/run_integration_tests.sh new file mode 100755 index 000000000..d09bd21e7 --- /dev/null +++ b/scripts/run_integration_tests.sh @@ -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 |