5 declare -a expiration_types=("absolute" "relative" "both")
7 for typ in "${expiration_types[@]}"; do
8 begin_test "expired action ($typ time)"
12 reponame="expired-$typ"
13 setup_remote_repo "$reponame"
14 clone_repo "$reponame" "$reponame"
17 contents_oid="$(calc_oid "$contents")"
20 git add .gitattributes
21 git commit -m "initial commit"
23 printf "$contents" > a.dat
26 git commit -m "add a.dat"
28 GIT_TRACE=1 git push origin master 2>&1 | tee push.log
29 if [ "0" -eq "${PIPESTATUS[0]}" ]; then
30 echo >&2 "fatal: expected push to fail, didn't"
34 refute_server_object "$reponame" "$contents_oid"
39 for typ in "${expiration_types[@]}"; do
40 begin_test "ssh expired ($typ time)"
44 reponame="ssh-expired-$typ"
45 setup_remote_repo "$reponame"
46 clone_repo "$reponame" "$reponame"
48 sshurl="${GITSERVER/http:\/\//ssh://git@}/$reponame"
49 git config lfs.url "$sshurl"
52 contents_oid="$(calc_oid "$contents")"
55 git add .gitattributes
56 git commit -m "initial commit"
58 printf "$contents" > a.dat
61 git commit -m "add a.dat"
63 GIT_TRACE=1 git push origin master 2>&1 | tee push.log
64 grep "ssh cache expired" push.log