Code

t0303: immediately bail out w/o GIT_TEST_CREDENTIAL_HELPER
[git.git] / t / t0303-credential-external.sh
1 #!/bin/sh
3 test_description='external credential helper tests'
4 . ./test-lib.sh
5 . "$TEST_DIRECTORY"/lib-credential.sh
7 if test -z "$GIT_TEST_CREDENTIAL_HELPER"; then
8         skip_all="used to test external credential helpers"
9         test_done
10 fi
12 test -z "$GIT_TEST_CREDENTIAL_HELPER_SETUP" ||
13         eval "$GIT_TEST_CREDENTIAL_HELPER_SETUP"
15 # clean before the test in case there is cruft left
16 # over from a previous run that would impact results
17 helper_test_clean "$GIT_TEST_CREDENTIAL_HELPER"
19 helper_test "$GIT_TEST_CREDENTIAL_HELPER"
21 if test -z "$GIT_TEST_CREDENTIAL_HELPER_TIMEOUT"; then
22         say "# skipping timeout tests (GIT_TEST_CREDENTIAL_HELPER_TIMEOUT not set)"
23 else
24         helper_test_timeout "$GIT_TEST_CREDENTIAL_HELPER_TIMEOUT"
25 fi
27 # clean afterwards so that we are good citizens
28 # and don't leave cruft in the helper's storage, which
29 # might be long-term system storage
30 helper_test_clean "$GIT_TEST_CREDENTIAL_HELPER"
32 test_done