remove unused tests

This commit is contained in:
risk danger olson 2016-11-08 13:41:08 -07:00
parent 637ad9f0f7
commit 77e624dad9
4 changed files with 0 additions and 205 deletions

@ -1,61 +0,0 @@
#!/usr/bin/env bash
. "test/testlib.sh"
begin_test "batch transfer unsupported on server"
(
set -e
# This initializes a new bare git repository in test/remote.
# These remote repositories are global to every test, so keep the names
# unique.
reponame="batchunsupported"
setup_remote_repo "$reponame"
# Clone the repository again to $TRASHDIR/repo. This will be used to commit
# and push objects.
clone_repo "$reponame" repo
# This executes Git LFS from the local repo that was just cloned.
git lfs track "*.dat" 2>&1 | tee track.log
grep "Tracking \*.dat" track.log
contents="a"
contents_oid=$(calc_oid "$contents")
printf "$contents" > a.dat
git add a.dat
git add .gitattributes
git commit -m "add a.dat" 2>&1 | tee commit.log
grep "master (root-commit)" commit.log
grep "2 files changed" commit.log
grep "create mode 100644 a.dat" commit.log
grep "create mode 100644 .gitattributes" commit.log
[ "a" = "$(cat a.dat)" ]
# This is a small shell function that runs several git commands together.
assert_pointer "master" "a.dat" "$contents_oid" 1
refute_server_object "$reponame" "$contents_oid"
# Ensure batch transfer is turned on for this repo
git config --add --local lfs.batch true
# This pushes to the remote repository set up at the top of the test.
git push origin master 2>&1 | tee push.log
grep "(1 of 1 files)" push.log
grep "master -> master" push.log
assert_server_object "$reponame" "$contents_oid"
# Assert that configuration was disabled
set +e
git config --file .gitconfig lfs.batch
if [ $? -eq 0 ]
then
exit 1
fi
set -e
)
end_test

@ -32,34 +32,3 @@ begin_test "push: upload to bad dns"
fi
)
end_test
begin_test "push (legacy): upload to bad dns"
(
set -e
reponame="$(basename "$0" ".sh")-bad-dns-legacy"
setup_remote_repo "$reponame"
clone_repo "$reponame" "$reponame"
git lfs track "*.dat"
printf "hi" > good.dat
git add .gitattributes good.dat
git commit -m "welp"
port="$(echo "http://127.0.0.1:63378" | cut -f 3 -d ":")"
git config lfs.batch false
git config lfs.url "http://git-lfs-bad-dns:$port"
set +e
GIT_TERMINAL_PROMPT=0 git push origin master 2>&1 | tee push.log
res="${PIPESTATUS[0]}"
set -e
grep "WARNING: Git LFS is using a deprecated API" push.log
refute_server_object "$reponame" "$(calc_oid "hi")"
if [ "$res" = "0" ]; then
echo "push successful?"
exit 1
fi
)
end_test

@ -1,112 +0,0 @@
#!/usr/bin/env bash
. "test/testlib.sh"
push_legacy_fail_test() {
local contents="$1"
set -e
local reponame="$(basename "$0" ".sh")-$contents"
setup_remote_repo "$reponame"
clone_repo "$reponame" "$reponame"
git config lfs.batch false
git lfs track "*.dat"
printf "hi" > good.dat
printf "$contents" > bad.dat
git add .gitattributes good.dat bad.dat
git commit -m "welp"
set +e
git push origin master 2>&1 | tee push.log
res="${PIPESTATUS[0]}"
set -e
grep "WARNING: Git LFS is using a deprecated API" push.log
refute_server_object "$reponame" "$(calc_oid "$contents")"
if [ "$res" = "0" ]; then
echo "push successful?"
exit 1
fi
}
begin_test "push (legacy): upload file with storage 403"
(
set -e
push_legacy_fail_test "status-storage-403"
)
end_test
begin_test "push (legacy): upload file with storage 404"
(
set -e
push_legacy_fail_test "status-storage-404"
)
end_test
begin_test "push (legacy): upload file with storage 410"
(
set -e
push_legacy_fail_test "status-storage-410"
)
end_test
begin_test "push (legacy): upload file with storage 422"
(
set -e
push_legacy_fail_test "status-storage-422"
)
end_test
begin_test "push (legacy): upload file with storage 500"
(
set -e
push_legacy_fail_test "status-storage-500"
)
end_test
begin_test "push (legacy): upload file with api 403"
(
set -e
push_legacy_fail_test "status-legacy-403"
)
end_test
begin_test "push (legacy): upload file with api 404"
(
set -e
push_legacy_fail_test "status-legacy-404"
)
end_test
begin_test "push (legacy): upload file with api 410"
(
set -e
push_legacy_fail_test "status-legacy-410"
)
end_test
begin_test "push (legacy): upload file with api 422"
(
set -e
push_legacy_fail_test "status-legacy-422"
)
end_test
begin_test "push (legacy): upload file with api 500"
(
set -e
push_legacy_fail_test "status-legacy-500"
)
end_test

@ -117,7 +117,6 @@ export GIT_CONFIG_NOSYSTEM
mkdir -p "$TMPDIR"
mkdir -p "$TRASHDIR"
if [ $IS_WINDOWS -eq 1 ]; then
# prevent Windows OpenSSH from opening GUI prompts
SSH_ASKPASS=""