Commit 7d254e63 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'ac-accelerate-wiki' into 'master'

Accelerate wiki attachments

See merge request gitlab-org/gitlab-workhorse!422
parents 6ca9bc1e 02bf9bd0
...@@ -202,6 +202,11 @@ func (u *upstream) configureRoutes() { ...@@ -202,6 +202,11 @@ func (u *upstream) configureRoutes() {
// Maven Artifact Repository // Maven Artifact Repository
route("PUT", apiPattern+`v4/projects/[0-9]+/packages/maven/`, filestore.BodyUploader(api, proxy, nil)), route("PUT", apiPattern+`v4/projects/[0-9]+/packages/maven/`, filestore.BodyUploader(api, proxy, nil)),
// We are porting API to disk acceleration
// we need to declare each routes until we have fixed all the routes on the rails codebase.
// Overall status can be seen at https://gitlab.com/groups/gitlab-org/-/epics/1802#current-status
route("POST", apiPattern+`v4/projects/[0-9]+/wikis/attachments\z`, uploadAccelerateProxy),
// Explicitly proxy API requests // Explicitly proxy API requests
route("", apiPattern, proxy), route("", apiPattern, proxy),
route("", ciAPIPattern, proxy), route("", ciAPIPattern, proxy),
......
...@@ -116,7 +116,7 @@ func TestAcceleratedUpload(t *testing.T) { ...@@ -116,7 +116,7 @@ func TestAcceleratedUpload(t *testing.T) {
ws := startWorkhorseServer(ts.URL) ws := startWorkhorseServer(ts.URL)
defer ws.Close() defer ws.Close()
resources := []string{`/example`, `/uploads/personal_snippet`, `/uploads/user`} resources := []string{`/example`, `/uploads/personal_snippet`, `/uploads/user`, `/api/v4/projects/1/wikis/attachments`}
for _, resource := range resources { for _, resource := range resources {
reqBody, contentType, err := multipartBodyWithFile() reqBody, contentType, err := multipartBodyWithFile()
require.NoError(t, err) require.NoError(t, err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment