t0303: resurrect commit message as test documentation

The commit message which added those tests (861444f 't: add test harness for external credential helpers' 2011-12-10) provided nice documentation in the commit message. Let's make it more visible by putting it in the test description. The documentation is updated to reflect the fact that GIT_TEST_CREDENTIAL_HELPER must be set for GIT_TEST_CREDENTIAL_HELPER_TIMEOUT to be used and GIT_TEST_CREDENTIAL_HELPER_SETUP can be used. Based-on-commit-message-by: Jeff King <peff@peff.net> Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Zbigniew Jędrzejewski-Szmek committed Mar 15, 2012 at 12:08 UTC 6c556cb8e6a6ef14966bf7e78e5308a38028b54c
1 file changed +29 -1
t/t0303-credential-external.sh
+29 -1
@@ -1,6 +1,34 @@
1 #!/bin/sh
2
3 -test_description='external credential helper tests'
3 +test_description='external credential helper tests
4 +
5 +This is a tool for authors of external helper tools to sanity-check
6 +their helpers. If you have written the "git-credential-foo" helper,
7 +you check it with:
8 +
9 + make GIT_TEST_CREDENTIAL_HELPER=foo t0303-credential-external.sh
10 +
11 +This assumes that your helper is capable of both storing and
12 +retrieving credentials (some helpers may be read-only, and they will
13 +fail these tests).
14 +
15 +Please note that the individual tests do not verify all of the
16 +preconditions themselves, but rather build on each other. A failing
17 +test means that tests later in the sequence can return false "OK"
18 +results.
19 +
20 +If your helper supports time-based expiration with a configurable
21 +timeout, you can test that feature with:
22 +
23 + make GIT_TEST_CREDENTIAL_HELPER=foo \
24 + GIT_TEST_CREDENTIAL_HELPER_TIMEOUT="foo --timeout=1" \
25 + t0303-credential-external.sh
26 +
27 +If your helper requires additional setup before the tests are started,
28 +you can set GIT_TEST_CREDENTIAL_HELPER_SETUP to a sequence of shell
29 +commands.
30 +'
31 +
32 . ./test-lib.sh
33 . "$TEST_DIRECTORY"/lib-credential.sh
34