Commit e1ac292a authored by Alex Kalderimis's avatar Alex Kalderimis

Merge branch 'dz-redirect-deprecated-pipeline-routes' into 'master'

Redirect deprecated pipeline routes

See merge request gitlab-org/gitlab!53990
parents 463d889e c646422d
---
title: Redirect deprecated pipeline routes
merge_request: 53990
author:
type: removed
...@@ -553,7 +553,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -553,7 +553,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
# Deprecated unscoped routing. # Deprecated unscoped routing.
scope as: 'deprecated' do scope as: 'deprecated' do
# Issue https://gitlab.com/gitlab-org/gitlab/issues/118849 # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
draw :pipelines
draw :repository draw :repository
# Issue https://gitlab.com/gitlab-org/gitlab/-/issues/29572 # Issue https://gitlab.com/gitlab-org/gitlab/-/issues/29572
...@@ -576,7 +575,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -576,7 +575,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
:environments, :protected_environments, :error_tracking, :alert_management, :environments, :protected_environments, :error_tracking, :alert_management,
:tracing, :tracing,
:serverless, :clusters, :audit_events, :wikis, :merge_requests, :serverless, :clusters, :audit_events, :wikis, :merge_requests,
:vulnerability_feedback, :security, :dependencies, :issues) :vulnerability_feedback, :security, :dependencies, :issues,
:pipelines, :pipeline_schedules)
end end
# rubocop: disable Cop/PutProjectRoutesUnderScope # rubocop: disable Cop/PutProjectRoutesUnderScope
......
...@@ -37,7 +37,7 @@ RSpec.describe 'EE-specific project routing' do ...@@ -37,7 +37,7 @@ RSpec.describe 'EE-specific project routing' do
# security_namespace_project_pipeline GET /:project_id/pipelines/:id/security(.:format) # security_namespace_project_pipeline GET /:project_id/pipelines/:id/security(.:format)
describe Projects::PipelinesController, 'routing' do describe Projects::PipelinesController, 'routing' do
it 'to #security' do it 'to #security' do
expect(get('/gitlab/gitlabhq/pipelines/12/security')).to route_to('projects/pipelines#security', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '12') expect(get('/gitlab/gitlabhq/-/pipelines/12/security')).to route_to('projects/pipelines#security', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '12')
end end
end end
......
...@@ -684,6 +684,26 @@ RSpec.describe 'project routing' do ...@@ -684,6 +684,26 @@ RSpec.describe 'project routing' do
end end
end end
describe Projects::PipelinesController, 'routing' do
it 'to #index' do
expect(get('/gitlab/gitlabhq/-/pipelines')).to route_to('projects/pipelines#index', namespace_id: 'gitlab', project_id: 'gitlabhq')
end
it 'to #show' do
expect(get('/gitlab/gitlabhq/-/pipelines/12')).to route_to('projects/pipelines#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '12')
end
it_behaves_like 'redirecting a legacy path', '/gitlab/gitlabhq/pipelines', '/gitlab/gitlabhq/-/pipelines'
end
describe Projects::PipelineSchedulesController, 'routing' do
it 'to #index' do
expect(get('/gitlab/gitlabhq/-/pipeline_schedules')).to route_to('projects/pipeline_schedules#index', namespace_id: 'gitlab', project_id: 'gitlabhq')
end
it_behaves_like 'redirecting a legacy path', '/gitlab/gitlabhq/pipeline_schedules', '/gitlab/gitlabhq/-/pipeline_schedules'
end
describe Projects::Settings::OperationsController, 'routing' do describe Projects::Settings::OperationsController, 'routing' do
it 'to #reset_alerting_token' do it 'to #reset_alerting_token' do
expect(post('/gitlab/gitlabhq/-/settings/operations/reset_alerting_token')).to route_to('projects/settings/operations#reset_alerting_token', namespace_id: 'gitlab', project_id: 'gitlabhq') expect(post('/gitlab/gitlabhq/-/settings/operations/reset_alerting_token')).to route_to('projects/settings/operations#reset_alerting_token', namespace_id: 'gitlab', project_id: 'gitlabhq')
......
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