@@ -23,13 +23,13 @@ func TestAPILFSLocksNotStarted(t *testing.T) {
23
23
user := models .AssertExistsAndLoadBean (t , & models.User {ID : 2 }).(* models.User )
24
24
repo := models .AssertExistsAndLoadBean (t , & models.Repository {ID : 1 }).(* models.Repository )
25
25
26
- req := NewRequestf (t , "GET" , "/%s/%s/info/lfs/locks" , user .Name , repo .Name )
26
+ req := NewRequestf (t , "GET" , "/%s/%s.git /info/lfs/locks" , user .Name , repo .Name )
27
27
MakeRequest (t , req , http .StatusNotFound )
28
- req = NewRequestf (t , "POST" , "/%s/%s/info/lfs/locks" , user .Name , repo .Name )
28
+ req = NewRequestf (t , "POST" , "/%s/%s.git /info/lfs/locks" , user .Name , repo .Name )
29
29
MakeRequest (t , req , http .StatusNotFound )
30
- req = NewRequestf (t , "GET" , "/%s/%s/info/lfs/locks/verify" , user .Name , repo .Name )
30
+ req = NewRequestf (t , "GET" , "/%s/%s.git /info/lfs/locks/verify" , user .Name , repo .Name )
31
31
MakeRequest (t , req , http .StatusNotFound )
32
- req = NewRequestf (t , "GET" , "/%s/%s/info/lfs/locks/10/unlock" , user .Name , repo .Name )
32
+ req = NewRequestf (t , "GET" , "/%s/%s.git /info/lfs/locks/10/unlock" , user .Name , repo .Name )
33
33
MakeRequest (t , req , http .StatusNotFound )
34
34
}
35
35
@@ -39,9 +39,8 @@ func TestAPILFSLocksNotLogin(t *testing.T) {
39
39
user := models .AssertExistsAndLoadBean (t , & models.User {ID : 2 }).(* models.User )
40
40
repo := models .AssertExistsAndLoadBean (t , & models.Repository {ID : 1 }).(* models.Repository )
41
41
42
- req := NewRequestf (t , "GET" , "/%s/%s/info/lfs/locks" , user .Name , repo .Name )
42
+ req := NewRequestf (t , "GET" , "/%s/%s.git /info/lfs/locks" , user .Name , repo .Name )
43
43
req .Header .Set ("Accept" , "application/vnd.git-lfs+json" )
44
- req .Header .Set ("Content-Type" , "application/vnd.git-lfs+json" )
45
44
resp := MakeRequest (t , req , http .StatusForbidden )
46
45
var lfsLockError api.LFSLockError
47
46
DecodeJSON (t , resp , & lfsLockError )
@@ -102,7 +101,7 @@ func TestAPILFSLocksLogged(t *testing.T) {
102
101
//create locks
103
102
for _ , test := range tests {
104
103
session := loginUser (t , test .user .Name )
105
- req := NewRequestWithJSON (t , "POST" , fmt .Sprintf ("/%s/info/lfs/locks" , test .repo .FullName ()), map [string ]string {"path" : test .path })
104
+ req := NewRequestWithJSON (t , "POST" , fmt .Sprintf ("/%s.git /info/lfs/locks" , test .repo .FullName ()), map [string ]string {"path" : test .path })
106
105
req .Header .Set ("Accept" , "application/vnd.git-lfs+json" )
107
106
req .Header .Set ("Content-Type" , "application/vnd.git-lfs+json" )
108
107
session .MakeRequest (t , req , test .httpResult )
@@ -116,9 +115,8 @@ func TestAPILFSLocksLogged(t *testing.T) {
116
115
//check creation
117
116
for _ , test := range resultsTests {
118
117
session := loginUser (t , test .user .Name )
119
- req := NewRequestf (t , "GET" , "/%s/info/lfs/locks" , test .repo .FullName ())
118
+ req := NewRequestf (t , "GET" , "/%s.git /info/lfs/locks" , test .repo .FullName ())
120
119
req .Header .Set ("Accept" , "application/vnd.git-lfs+json" )
121
- req .Header .Set ("Content-Type" , "application/vnd.git-lfs+json" )
122
120
resp := session .MakeRequest (t , req , http .StatusOK )
123
121
var lfsLocks api.LFSLockList
124
122
DecodeJSON (t , resp , & lfsLocks )
@@ -128,7 +126,7 @@ func TestAPILFSLocksLogged(t *testing.T) {
128
126
assert .WithinDuration (t , test .locksTimes [i ], lock .LockedAt , 1 * time .Second )
129
127
}
130
128
131
- req = NewRequestWithJSON (t , "POST" , fmt .Sprintf ("/%s/info/lfs/locks/verify" , test .repo .FullName ()), map [string ]string {})
129
+ req = NewRequestWithJSON (t , "POST" , fmt .Sprintf ("/%s.git /info/lfs/locks/verify" , test .repo .FullName ()), map [string ]string {})
132
130
req .Header .Set ("Accept" , "application/vnd.git-lfs+json" )
133
131
req .Header .Set ("Content-Type" , "application/vnd.git-lfs+json" )
134
132
resp = session .MakeRequest (t , req , http .StatusOK )
@@ -152,7 +150,7 @@ func TestAPILFSLocksLogged(t *testing.T) {
152
150
//remove all locks
153
151
for _ , test := range deleteTests {
154
152
session := loginUser (t , test .user .Name )
155
- req := NewRequestWithJSON (t , "POST" , fmt .Sprintf ("/%s/info/lfs/locks/%s/unlock" , test .repo .FullName (), test .lockID ), map [string ]string {})
153
+ req := NewRequestWithJSON (t , "POST" , fmt .Sprintf ("/%s.git /info/lfs/locks/%s/unlock" , test .repo .FullName (), test .lockID ), map [string ]string {})
156
154
req .Header .Set ("Accept" , "application/vnd.git-lfs+json" )
157
155
req .Header .Set ("Content-Type" , "application/vnd.git-lfs+json" )
158
156
resp := session .MakeRequest (t , req , http .StatusOK )
@@ -165,9 +163,8 @@ func TestAPILFSLocksLogged(t *testing.T) {
165
163
// check that we don't have any lock
166
164
for _ , test := range resultsTests {
167
165
session := loginUser (t , test .user .Name )
168
- req := NewRequestf (t , "GET" , "/%s/info/lfs/locks" , test .repo .FullName ())
166
+ req := NewRequestf (t , "GET" , "/%s.git /info/lfs/locks" , test .repo .FullName ())
169
167
req .Header .Set ("Accept" , "application/vnd.git-lfs+json" )
170
- req .Header .Set ("Content-Type" , "application/vnd.git-lfs+json" )
171
168
resp := session .MakeRequest (t , req , http .StatusOK )
172
169
var lfsLocks api.LFSLockList
173
170
DecodeJSON (t , resp , & lfsLocks )
0 commit comments