mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
@@ -54,9 +54,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)
|
||||
})
|
||||
}
|
||||
|
@@ -45,6 +45,7 @@ SIGNING_KEY = none
|
||||
SSH_DOMAIN = localhost
|
||||
HTTP_PORT = 3003
|
||||
ROOT_URL = http://localhost:3003/
|
||||
LOCAL_ROOT_URL = http://127.0.0.1:3003/
|
||||
DISABLE_SSH = false
|
||||
SSH_LISTEN_HOST = localhost
|
||||
SSH_PORT = 2201
|
||||
|
@@ -47,6 +47,7 @@ SIGNING_KEY = none
|
||||
SSH_DOMAIN = localhost
|
||||
HTTP_PORT = 3001
|
||||
ROOT_URL = http://localhost:3001/
|
||||
LOCAL_ROOT_URL = http://127.0.0.1:3001/
|
||||
DISABLE_SSH = false
|
||||
SSH_LISTEN_HOST = localhost
|
||||
SSH_PORT = 2201
|
||||
|
@@ -46,6 +46,7 @@ SIGNING_KEY = none
|
||||
SSH_DOMAIN = localhost
|
||||
HTTP_PORT = 3002
|
||||
ROOT_URL = http://localhost:3002/
|
||||
LOCAL_ROOT_URL = http://127.0.0.1:3002/
|
||||
DISABLE_SSH = false
|
||||
SSH_LISTEN_HOST = localhost
|
||||
SSH_PORT = 2202
|
||||
|
@@ -41,6 +41,7 @@ SIGNING_KEY = none
|
||||
SSH_DOMAIN = localhost
|
||||
HTTP_PORT = 3003
|
||||
ROOT_URL = http://localhost:3003/
|
||||
LOCAL_ROOT_URL = http://127.0.0.1:3003/
|
||||
DISABLE_SSH = false
|
||||
SSH_LISTEN_HOST = localhost
|
||||
SSH_PORT = 2203
|
||||
|
Reference in New Issue
Block a user