enable credential.usehttppath by default in tests

This commit is contained in:
risk danger olson 2016-07-15 15:05:06 -06:00
parent 99af66b485
commit 18de3ae7fe
3 changed files with 17 additions and 18 deletions

@ -34,7 +34,6 @@ begin_test "attempt private access without credential helper"
git add .gitattributes
git commit -m "initial commit"
git config credential.usehttppath true
git config --global credential.helper lfsnoop
git config credential.helper lfsnoop
git config -l

@ -12,6 +12,7 @@ begin_test "credentials without useHttpPath, with bad path password"
printf "path:wrong" > "$CREDSDIR/127.0.0.1--$reponame"
clone_repo "$reponame" without-path
git config credential.useHttpPath false
git checkout -b without-path
git lfs track "*.dat" 2>&1 | tee track.log
@ -40,7 +41,6 @@ begin_test "credentials with useHttpPath, with wrong password"
printf "path:wrong" > "$CREDSDIR/127.0.0.1--$reponame"
clone_repo "$reponame" with-path-wrong-pass
git config credential.useHttpPath true
git checkout -b with-path-wrong-pass
git lfs track "*.dat" 2>&1 | tee track.log
@ -69,7 +69,6 @@ begin_test "credentials with useHttpPath, with correct password"
printf "path:$reponame" > "$CREDSDIR/127.0.0.1--$reponame"
clone_repo "$reponame" with-path-correct-pass
git config credential.useHttpPath true
git checkout -b with-path-correct-pass
git lfs track "*.dat" 2>&1 | tee track.log
@ -101,6 +100,21 @@ begin_test "git credential"
cd empty
git init
echo "protocol=http
host=credential-test.com
path=some/path" | GIT_TERMINAL_PROMPT=0 git credential fill > cred.log
cat cred.log
expected="protocol=http
host=credential-test.com
path=some/path
username=git
password=path"
[ "$expected" = "$(cat cred.log)" ]
git config credential.useHttpPath false
echo "protocol=http
host=credential-test.com" | GIT_TERMINAL_PROMPT=0 git credential fill > cred.log
cat cred.log
@ -122,21 +136,6 @@ username=git
password=server"
[ "$expected" = "$(cat cred.log)" ]
git config credential.useHttpPath true
echo "protocol=http
host=credential-test.com
path=some/path" | GIT_TERMINAL_PROMPT=0 git credential fill > cred.log
cat cred.log
expected="protocol=http
host=credential-test.com
path=some/path
username=git
password=path"
[ "$expected" = "$(cat cred.log)" ]
)
end_test

@ -302,6 +302,7 @@ setup() {
HOME="$TESTHOME"
mkdir "$HOME"
git lfs install
git config --global credential.usehttppath true
git config --global credential.helper lfstest
git config --global user.name "Git LFS Tests"
git config --global user.email "git-lfs@example.com"