9e006ac4e2
Currently, our default branch in tests is "master". This is the Git default, but the Git default will likely change in the future, so it makes sense to update our testsuite to be explicit about the branch name. We'll ensure this continues by building against older versions of Git as well as newer versions. We use "main" for the new branch name, since that's the proposed value upstream. This commit was made entirely by automated means using the following command: git grep -l master t | xargs sed -i -e 's/master/main/g'
37 lines
704 B
Bash
Executable File
37 lines
704 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
. "$(dirname "$0")/testlib.sh"
|
|
|
|
begin_test "transfer queue rejects unknown OIDs"
|
|
(
|
|
set -e
|
|
|
|
reponame="unknown-oids"
|
|
setup_remote_repo "$reponame"
|
|
clone_repo "$reponame" "$reponame"
|
|
|
|
git lfs track "*.dat"
|
|
git add .gitattributes
|
|
git commit -m "initial commit"
|
|
|
|
contents="unknown-oid"
|
|
printf "%s" "$contents" > a.dat
|
|
|
|
git add a.dat
|
|
git commit -m "add objects"
|
|
|
|
set +e
|
|
git push origin main 2>&1 | tee push.log
|
|
res="${PIPESTATUS[0]}"
|
|
set -e
|
|
|
|
refute_server_object "$reponame" "$(calc_oid "$contents")"
|
|
if [ "0" -eq "$res" ]; then
|
|
echo "push successful?"
|
|
exit 1
|
|
fi
|
|
|
|
grep "\[unknown-oid\] The server returned an unknown OID." push.log
|
|
)
|
|
end_test
|