simplify happy-path tests a bit

This commit is contained in:
Rick Olson 2015-05-27 13:59:52 -06:00
parent 7f11548062
commit 086d04b463

@ -23,8 +23,8 @@ begin_test "happy path"
clone_repo "$reponame" repo clone_repo "$reponame" repo
# This executes Git LFS from the local repo that was just cloned. # This executes Git LFS from the local repo that was just cloned.
out=$(git lfs track "*.dat" 2>&1) git lfs track "*.dat" 2>&1 | tee track.log
echo "$out" | grep "Tracking \*.dat" grep "Tracking \*.dat" track.log
contents="a" contents="a"
contents_oid=$(printf "$contents" | shasum -a 256 | cut -f 1 -d " ") contents_oid=$(printf "$contents" | shasum -a 256 | cut -f 1 -d " ")
@ -39,10 +39,7 @@ begin_test "happy path"
grep "create mode 100644 a.dat" commit.log grep "create mode 100644 a.dat" commit.log
grep "create mode 100644 .gitattributes" commit.log grep "create mode 100644 .gitattributes" commit.log
out=$(cat a.dat) [ "a" = "$(cat a.dat)" ]
if [ "$out" != "a" ]; then
exit 1
fi
# This is a small shell function that runs several git commands together. # This is a small shell function that runs several git commands together.
assert_pointer "master" "a.dat" "$contents_oid" 1 assert_pointer "master" "a.dat" "$contents_oid" 1
@ -61,10 +58,7 @@ begin_test "happy path"
git pull 2>&1 | grep "Downloading a.dat (1 B)" git pull 2>&1 | grep "Downloading a.dat (1 B)"
out=$(cat a.dat) [ "a" = "$(cat a.dat)" ]
if [ "$out" != "a" ]; then
exit 1
fi
assert_pointer "master" "a.dat" "$contents_oid" 1 assert_pointer "master" "a.dat" "$contents_oid" 1
) )