Re: [GSoC][PATCH v5 3/3] credential-cache: add tests for XDG functionality
From: Junio C Hamano <hidden>
Date: 2017-03-17 05:38:53
Devin Lehmacher [off-list ref] writes:
+# 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.
+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' ' ...
+ test_when_finished " +... +' + helper_test_timeout cache --timeout=1 # we can't rely on our "trap" above working after test_done,
Thanks.