github.com/git-lfs/git-lfs@v2.5.2+incompatible/t/t-push-bad-dns.sh (about) 1 #!/usr/bin/env bash 2 3 . "$(dirname "$0")/testlib.sh" 4 5 ensure_git_version_isnt $VERSION_LOWER "2.3.0" 6 7 begin_test "push: upload to bad dns" 8 ( 9 set -e 10 11 reponame="$(basename "$0" ".sh")-bad-dns" 12 setup_remote_repo "$reponame" 13 clone_repo "$reponame" "$reponame" 14 15 git lfs track "*.dat" 16 printf "hi" > good.dat 17 git add .gitattributes good.dat 18 git commit -m "welp" 19 20 port="$(echo "http://127.0.0.1:63378" | cut -f 3 -d ":")" 21 git config lfs.url "http://git-lfs-bad-dns:$port" 22 23 set +e 24 GIT_TERMINAL_PROMPT=0 git push origin master 2>&1 | tee push.log 25 res="${PIPESTATUS[0]}" 26 set -e 27 28 refute_server_object "$reponame" "$(calc_oid "hi")" 29 if [ "$res" = "0" ]; then 30 cat push.log 31 32 echo "push successful?" 33 exit 1 34 fi 35 ) 36 end_test