mirror of
https://github.com/go-gitea/gitea
synced 2025-07-06 10:37:20 +00:00
Backport #33840 by wxiaoguang Fix #33839 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -55,9 +55,14 @@ func TestGitLFSSSH(t *testing.T) {
|
||||
return strings.Contains(s, "POST /api/internal/repo/user2/repo1.git/info/lfs/objects/batch")
|
||||
})
|
||||
countUpload := slices.ContainsFunc(routerCalls, func(s string) bool {
|
||||
return strings.Contains(s, "PUT /user2/repo1.git/info/lfs/objects/")
|
||||
return strings.Contains(s, "PUT /api/internal/repo/user2/repo1.git/info/lfs/objects/")
|
||||
})
|
||||
nonAPIRequests := slices.ContainsFunc(routerCalls, func(s string) bool {
|
||||
fields := strings.Fields(s)
|
||||
return !strings.HasPrefix(fields[1], "/api/")
|
||||
})
|
||||
assert.NotZero(t, countBatch)
|
||||
assert.NotZero(t, countUpload)
|
||||
assert.Zero(t, nonAPIRequests)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user