Debian Codegraph @

t/t-upload-redirect.sh

raw symbols SCIP
1 #!/usr/bin/env bash
2
3 . "$(dirname "$0")/testlib.sh"
4
5 begin_test "redirect upload"
6 (
7 set -e
8
9 reponame="redirect-storage-upload"
10 setup_remote_repo "$reponame"
11 clone_repo "$reponame" redirect-repo-upload
12
13 contents="redirect-storage-upload"
14 oid="$(calc_oid "$contents")"
15 printf "%s" "$contents" > a.dat
16
17 git lfs track "*.dat"
18 git add .gitattributes a.dat
19 git commit -m "initial commit"
20
21 GIT_TRACE=1 git push origin main 2>&1 | tee push.log
22 if [ "0" -ne "${PIPESTATUS[0]}" ]; then
23 echo >&2 "fatal: expected \`git push origin main\` to succeed ..."
24 exit 1
25 fi
26
27 grep "api: redirect" push.log
28
29 assert_server_object "$reponame" "$oid"
30 )
31 end_test