diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/routing/group_routing_spec.rb | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/routing/group_routing_spec.rb')
-rw-r--r-- | spec/routing/group_routing_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/routing/group_routing_spec.rb b/spec/routing/group_routing_spec.rb index f171c2faf5e..5c2ef62683e 100644 --- a/spec/routing/group_routing_spec.rb +++ b/spec/routing/group_routing_spec.rb @@ -85,6 +85,26 @@ RSpec.describe "Groups", "routing" do expect(get('/v2')).to route_to('groups/dependency_proxy_auth#authenticate') end + it 'routes to #upload_manifest' do + expect(post('v2/gitlabhq/dependency_proxy/containers/alpine/manifests/latest/upload')) + .to route_to('groups/dependency_proxy_for_containers#upload_manifest', group_id: 'gitlabhq', image: 'alpine', tag: 'latest') + end + + it 'routes to #upload_blob' do + expect(post('v2/gitlabhq/dependency_proxy/containers/alpine/blobs/abc12345/upload')) + .to route_to('groups/dependency_proxy_for_containers#upload_blob', group_id: 'gitlabhq', image: 'alpine', sha: 'abc12345') + end + + it 'routes to #upload_manifest_authorize' do + expect(post('v2/gitlabhq/dependency_proxy/containers/alpine/manifests/latest/upload/authorize')) + .to route_to('groups/dependency_proxy_for_containers#authorize_upload_manifest', group_id: 'gitlabhq', image: 'alpine', tag: 'latest') + end + + it 'routes to #upload_blob_authorize' do + expect(post('v2/gitlabhq/dependency_proxy/containers/alpine/blobs/abc12345/upload/authorize')) + .to route_to('groups/dependency_proxy_for_containers#authorize_upload_blob', group_id: 'gitlabhq', image: 'alpine', sha: 'abc12345') + end + context 'image name without namespace' do it 'routes to #manifest' do expect(get('/v2/gitlabhq/dependency_proxy/containers/ruby/manifests/2.3.6')) |