Merge branch 'bw/test-fix-grep-gnuism' into maint
[git/jrn.git] / t / t0303-credential-external.sh
blob267f4c8ba3284d30492d8907b6fc3230f40e02fc
1 #!/bin/sh
3 test_description='external credential helper tests'
4 . ./test-lib.sh
5 . "$TEST_DIRECTORY"/lib-credential.sh
7 pre_test() {
8 test -z "$GIT_TEST_CREDENTIAL_HELPER_SETUP" ||
9 eval "$GIT_TEST_CREDENTIAL_HELPER_SETUP"
11 # clean before the test in case there is cruft left
12 # over from a previous run that would impact results
13 helper_test_clean "$GIT_TEST_CREDENTIAL_HELPER"
16 post_test() {
17 # clean afterwards so that we are good citizens
18 # and don't leave cruft in the helper's storage, which
19 # might be long-term system storage
20 helper_test_clean "$GIT_TEST_CREDENTIAL_HELPER"
23 if test -z "$GIT_TEST_CREDENTIAL_HELPER"; then
24 say "# skipping external helper tests (set GIT_TEST_CREDENTIAL_HELPER)"
25 else
26 pre_test
27 helper_test "$GIT_TEST_CREDENTIAL_HELPER"
28 post_test
31 if test -z "$GIT_TEST_CREDENTIAL_HELPER_TIMEOUT"; then
32 say "# skipping external helper timeout tests"
33 else
34 pre_test
35 helper_test_timeout "$GIT_TEST_CREDENTIAL_HELPER_TIMEOUT"
36 post_test
39 test_done