• J
    t5550: factor out http auth setup · e837936c
    Jeff King 提交于
    The t5550 script sets up a nice askpass helper for
    simulating user input and checking what git prompted for.
    Let's make it available to other http scripts by migrating
    it to lib-httpd.
    
    We can use this immediately in t5540 to make our tests more
    robust (previously, we did not check at all that hitting the
    password-protected repo actually involved a password).
    Unfortunately, we end up failing the test because the
    current code erroneously prompts twice (once for
    git-remote-http, and then again when the former spawns
    git-http-push).
    
    More importantly, though, it will let us easily add
    smart-http authentication tests in t5541 and t5551; we
    currently do not test smart-http authentication at all.
    
    As part of making it generic, let's always look for and
    store auxiliary askpass files at the top-level trash
    directory; this makes it compatible with t5540, which runs
    some tests from sub-repositories. We can abstract away the
    ugliness with a short helper function.
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    e837936c
lib-httpd.sh 4.4 KB