test/pre-push: fix some incorrect assertions

This commit is contained in:
Taylor Blau 2017-02-16 14:21:41 -07:00
parent 3f802decb3
commit fbfe3f6063

@ -569,7 +569,9 @@ begin_test "pre-push locks verify 5xx with verification disabled"
endpoint="$(repo_endpoint $GITSERVER $reponame)" endpoint="$(repo_endpoint $GITSERVER $reponame)"
printf "example" > a.dat contents="example"
contents_oid="$(calc_oid "$contents")"
printf "$contents" > a.dat
git lfs track "*.dat" git lfs track "*.dat"
git add .gitattributes a.dat git add .gitattributes a.dat
git commit --message "initial commit" git commit --message "initial commit"
@ -579,7 +581,7 @@ begin_test "pre-push locks verify 5xx with verification disabled"
git push origin master 2>&1 | tee push.log git push origin master 2>&1 | tee push.log
[ "0" -eq "$(grep -c "\"origin\" does not support the LFS locking API" push.log)" ] [ "0" -eq "$(grep -c "\"origin\" does not support the LFS locking API" push.log)" ]
refute_server_object "$reponame" "$contents_oid" assert_server_object "$reponame" "$contents_oid"
) )
end_test end_test
@ -593,7 +595,9 @@ begin_test "pre-push locks verify 5xx with verification unset"
endpoint="$(repo_endpoint $GITSERVER $reponame)" endpoint="$(repo_endpoint $GITSERVER $reponame)"
printf "example" > a.dat contents="example"
contents_oid="$(calc_oid "$contents")"
printf "$contents" > a.dat
git lfs track "*.dat" git lfs track "*.dat"
git add .gitattributes a.dat git add .gitattributes a.dat
git commit --message "initial commit" git commit --message "initial commit"
@ -603,7 +607,7 @@ begin_test "pre-push locks verify 5xx with verification unset"
git push origin master 2>&1 | tee push.log git push origin master 2>&1 | tee push.log
grep "\"origin\" does not support the LFS locking API" push.log grep "\"origin\" does not support the LFS locking API" push.log
refute_server_object "$reponame" "$contents_oid" assert_server_object "$reponame" "$contents_oid"
) )
end_test end_test