Commit a929380b authored by Mathieu Parent's avatar Mathieu Parent

Remove "incoming/" section from the debian upload route

See https://gitlab.com/gitlab-org/gitlab-workhorse/-/issues/343
parent 226b0c20
......@@ -20,10 +20,10 @@ module API
requires :file_name, type: String, desc: 'The file name'
end
namespace 'incoming/:file_name', requirements: FILE_NAME_REQUIREMENTS do
namespace ':file_name', requirements: FILE_NAME_REQUIREMENTS do
content_type :json, Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE
# PUT {projects|groups}/:id/packages/debian/incoming/:file_name
# PUT {projects|groups}/:id/packages/debian/:file_name
params do
requires :file, type: ::API::Validations::Types::WorkhorseFile, desc: 'The package file to be published (generated by Multipart middleware)'
end
......@@ -42,7 +42,7 @@ module API
forbidden!
end
# PUT {projects|groups}/:id/packages/debian/incoming/:file_name/authorize
# PUT {projects|groups}/:id/packages/debian/:file_name/authorize
route_setting :authentication, deploy_token_allowed: true, basic_auth_personal_access_token: true, job_token_allowed: :basic_auth
put 'authorize' do
authorize_workhorse!(
......
......@@ -36,16 +36,16 @@ RSpec.describe API::DebianProjectPackages do
it_behaves_like 'Debian project repository GET endpoint', :success, 'TODO File'
end
describe 'PUT projects/:id/packages/debian/incoming/:file_name' do
describe 'PUT projects/:id/packages/debian/:file_name' do
let(:method) { :put }
let(:url) { "/projects/#{project.id}/packages/debian/incoming/#{file_name}" }
let(:url) { "/projects/#{project.id}/packages/debian/#{file_name}" }
it_behaves_like 'Debian project repository PUT endpoint', :created, nil
end
describe 'PUT projects/:id/packages/debian/incoming/:file_name/authorize' do
describe 'PUT projects/:id/packages/debian/:file_name/authorize' do
let(:method) { :put }
let(:url) { "/projects/#{project.id}/packages/debian/incoming/#{file_name}/authorize" }
let(:url) { "/projects/#{project.id}/packages/debian/#{file_name}/authorize" }
it_behaves_like 'Debian project repository PUT endpoint', :created, nil, is_authorize: true
end
......
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