Debian Codegraph @

t/t-upload-redirect.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 . "$(dirnamescip-shell system . . 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 printfscip-shell system . . printf. "%s" "$contents" > a.dat
16
17 gitscip-shell system . . git. lfs track "*.dat"
18 gitscip-shell system . . git. add .gitattributes a.dat
19 gitscip-shell system . . git. commit -m "initial commit"
20
21 GIT_TRACE=1 gitscip-shell system . . git. push origin main 2>&1 | teescip-shell system . . tee. push.log
22 if [scip-shell system . . `[`. "0" -ne "${PIPESTATUS[0]}" ]; then
23 echoscip-shell system . . echo. >&2 "fatal: expected \`git push origin main\` to succeed ..."
24 exit 1
25 fi
26
27 grepscip-shell system . . grep. "api: redirect" push.log
28
29 assert_server_object "$reponame" "$oid"
30 )
31 end_test