Commit 5c19d848 authored by Hayley Swimelar's avatar Hayley Swimelar

Add NuGet route for package uploads

parent 62409786
......@@ -207,6 +207,9 @@ func (u *upstream) configureRoutes() {
// Conan Artifact Repository
route("PUT", apiPattern+`v4/packages/conan/`, filestore.BodyUploader(api, proxy, nil)),
// NuGet Artifact Repository
route("PUT", apiPattern+`v4/projects/[0-9]+/packages/nuget/`, 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
......
......@@ -328,5 +328,12 @@ func testPackageFileUpload(t *testing.T, resource string) {
}
func TestPackageFilesUpload(t *testing.T) {
testPackageFileUpload(t, `/api/v4/packages/conan/v1/files`)
routes := []string{
"/api/v4/packages/conan/v1/files",
"/api/v4/projects/9001/packages/nuget/v1/files",
}
for _, r := range routes {
testPackageFileUpload(t, r)
}
}
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