test: ignore NSInvalidArgumentException exception in client cert test

works around a known issue with git on mac, compiled against the wrong openssl or curl libs
This commit is contained in:
risk danger olson 2017-01-25 14:49:35 -07:00
parent 868fc7bac9
commit 9a00eb3a68
2 changed files with 20 additions and 6 deletions

@ -136,17 +136,19 @@ begin_test "cloneSSL"
# Now check SSL clone with standard 'git clone' and smudge download # Now check SSL clone with standard 'git clone' and smudge download
rm -rf "$reponame" rm -rf "$reponame"
git clone "$SSLGITSERVER/$reponame" git clone "$SSLGITSERVER/$reponame"
) )
end_test end_test
begin_test "clone ClientCert" begin_test "clone ClientCert"
( (
set -e set -e
reponame="test-cloneClientCert" reponame="test-cloneClientCert"
setup_remote_repo "$reponame" setup_remote_repo "$reponame"
clone_repo_clientcert "$reponame" "$reponame" clone_repo_clientcert "$reponame" "$reponame"
if [ $(grep -c "client-cert-mac-openssl" clone_client_cert.log) -gt 0 ]; then
echo "Skipping due to SSL client cert bug in Git"
exit 0
fi
git lfs track "*.dat" 2>&1 | tee track.log git lfs track "*.dat" 2>&1 | tee track.log
grep "Tracking \*.dat" track.log grep "Tracking \*.dat" track.log

@ -283,14 +283,26 @@ clone_repo_clientcert() {
local reponame="$1" local reponame="$1"
local dir="$2" local dir="$2"
echo "clone $CLIENTCERTGITSERVER/$reponame to $dir" echo "clone $CLIENTCERTGITSERVER/$reponame to $dir"
set +e
out=$(git clone "$CLIENTCERTGITSERVER/$reponame" "$dir" 2>&1) out=$(git clone "$CLIENTCERTGITSERVER/$reponame" "$dir" 2>&1)
cd "$dir" res="${PIPESTATUS[0]}"
set -e
git config credential.helper lfstest if [ "0" -eq "$res" ]; then
#todo setup client cert... cd "$dir"
echo "$out" > clone_client_cert.log
git config credential.helper lfstest
exit 0
fi
echo "$out" > clone_client_cert.log echo "$out" > clone_client_cert.log
echo "$out" if [ $(grep -c "NSInvalidArgumentException" clone_client_cert.log) -gt 0 ]; then
echo "client-cert-mac-openssl" > clone_client_cert.log
exit 0
fi
exit 1
} }
# setup_remote_repo_with_file creates a remote repo, clones it locally, commits # setup_remote_repo_with_file creates a remote repo, clones it locally, commits