forked from git-lfs/git-lfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-push-failures.sh
More file actions
executable file
·110 lines (83 loc) · 1.58 KB
/
Copy pathtest-push-failures.sh
File metadata and controls
executable file
·110 lines (83 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/usr/bin/env bash
. "test/testlib.sh"
push_fail_test() {
local contents="$1"
set -e
local reponame="$(basename "$0" ".sh")-$contents"
setup_remote_repo "$reponame"
clone_repo "$reponame" "$reponame"
git lfs track "*.dat"
printf "hi" > good.dat
printf "$contents" > bad.dat
git add .gitattributes good.dat bad.dat
git commit -m "welp"
set +e
git push origin master
res="$?"
set -e
refute_server_object "$reponame" "$(calc_oid "$contents")"
if [ "$res" = "0" ]; then
echo "push successful?"
exit 1
fi
}
begin_test "push: upload file with storage 403"
(
set -e
push_fail_test "status-storage-403"
)
end_test
begin_test "push: upload file with storage 404"
(
set -e
push_fail_test "status-storage-404"
)
end_test
begin_test "push: upload file with storage 410"
(
set -e
push_fail_test "status-storage-410"
)
end_test
begin_test "push: upload file with storage 422"
(
set -e
push_fail_test "status-storage-422"
)
end_test
begin_test "push: upload file with storage 500"
(
set -e
push_fail_test "status-storage-500"
)
end_test
begin_test "push: upload file with api 403"
(
set -e
push_fail_test "status-batch-403"
)
end_test
begin_test "push: upload file with api 404"
(
set -e
push_fail_test "status-batch-404"
)
end_test
begin_test "push: upload file with api 410"
(
set -e
push_fail_test "status-batch-410"
)
end_test
begin_test "push: upload file with api 422"
(
set -e
push_fail_test "status-batch-422"
)
end_test
begin_test "push: upload file with api 500"
(
set -e
push_fail_test "status-batch-500"
)
end_test