Debian Codegraph @

t/t-push-bad-dns.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 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="$(basenamescip-shell system . . basename. "$0" ".sh")-bad-dns"
12 setup_remote_repo "$reponame"
13 clone_repo "$reponame" "$reponame"
14
15 gitscip-shell system . . git. lfs track "*.dat"
16 printfscip-shell system . . printf. "hi" > good.dat
17 gitscip-shell system . . git. add .gitattributes good.dat
18 gitscip-shell system . . git. commit -m "welp"
19
20 port="$(echoscip-shell system . . echo. "http://127.0.0.1:63378" | cutscip-shell system . . cut. -f 3 -d ":")"
21 gitscip-shell system . . git. config lfs.url "http://git-lfs-bad-dns:$port"
22
23 set +e
24 GIT_TERMINAL_PROMPT=0 gitscip-shell system . . git. push origin main 2>&1 | teescip-shell system . . tee. push.log
25 res="${PIPESTATUS[0]}"
26 set -e
27
28 refute_server_object "$reponame" "$(calc_oid "hi")"
29 if [scip-shell system . . `[`. "$res" = "0" ]; then
30 catscip-shell system . . cat. push.log
31
32 echoscip-shell system . . echo. "push successful?"
33 exit 1
34 fi
35 )
36 end_test