Re: [GSoC][PATCH v5 3/3] credential-cache: add tests for XDG functionality
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 17, 2017, 05:38 UTC
- Message-ID
- <xmqq37eca2e0.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170317025315.84548-3-lehmacdj@gmail.com>
Devin Lehmacher <lehmacdj@gmail.com> writes:
Show 11 quoted lines
> +# test that the daemon works with no special setup > helper_test cache > + > +test_expect_success 'socket defaults to ~/.cache/git/credential/socket' ' > + test_when_finished " > + git credential-cache exit && > + rmdir -p .cache/git/credential/ > + " && > + test_path_is_missing "$HOME/.git-credential-cache" && > + test -S "$HOME/.cache/git/credential/socket" > +'
OK, the clean-up looks quite sensible.
Show 5 quoted lines
> +test_expect_success "use custom XDG_CACHE_HOME even if xdg socket exists" ' > +... > + password=store-pass > + EOF > + find . &&
A leftover from a debugging session? If so remove the "find" line.
> + test -S "$HOME/.cache/git/credential/socket" && > + XDG_CACHE_HOME="$HOME/xdg" && > ... > +'
> +test_expect_success 'use user socket if user directory is a symlink to a directory' '
I think anybody without NO_UNIX_SOCKETS is practically capable of doing a symbolic link, but still it is a good idea to protect this one behind the SYMLINKS prerequisite, i.e.
test_expect_success SYMLINKS 'use ~/.git-credential-cache that is a symlink' ' ...
Show 7 quoted lines
> + test_when_finished " > +... > +' > + > helper_test_timeout cache --timeout=1 > > # we can't rely on our "trap" above working after test_done,
Thanks.