update test to clone empty repos first
This commit is contained in:
parent
904145fcce
commit
68f61f0160
@ -14,8 +14,12 @@ begin_test "happy path"
|
|||||||
reponame="$(basename "$0" ".sh")"
|
reponame="$(basename "$0" ".sh")"
|
||||||
setup_remote_repo "$reponame"
|
setup_remote_repo "$reponame"
|
||||||
|
|
||||||
# Clone the repository through the test Git server. It's cloned to
|
# Clone the repository from the test Git server. This is empty, and will be
|
||||||
# $TRASHDIR/repo.
|
# used to test a "git pull" below. The repo is cloned to $TRASHDIR/clone
|
||||||
|
clone_repo "$reponame" clone
|
||||||
|
|
||||||
|
# Clone the repository again to $TRASHDIR/repo. This will be used to commit
|
||||||
|
# and push objects.
|
||||||
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.
|
||||||
@ -52,10 +56,10 @@ begin_test "happy path"
|
|||||||
|
|
||||||
assert_server_object "$contents_oid" "$contents"
|
assert_server_object "$contents_oid" "$contents"
|
||||||
|
|
||||||
# This clones the repository to another subdirectory of $TRASHDIR
|
# change to the clone's working directory
|
||||||
out=$(clone_repo "$reponame" clone)
|
cd ../clone
|
||||||
echo "$out" | grep "Cloning into 'clone'"
|
|
||||||
echo "$out" | grep "Downloading a.dat (1 B)"
|
git pull 2>&1 | grep "Downloading a.dat (1 B)"
|
||||||
|
|
||||||
out=$(cat a.dat)
|
out=$(cat a.dat)
|
||||||
if [ "$out" != "a" ]; then
|
if [ "$out" != "a" ]; then
|
||||||
|
@ -108,6 +108,7 @@ clone_repo() {
|
|||||||
echo "$out"
|
echo "$out"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# setup initializes the clean, isolated environment for integration tests.
|
||||||
setup() {
|
setup() {
|
||||||
cd "$ROOTDIR"
|
cd "$ROOTDIR"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user