Commit 6db04a82 authored by Stan Hu's avatar Stan Hu

Merge branch '257829-feature-flag-rollout-of-limit_projects_in_groups_api' into 'master'

Remove the usage of the`limit_projects_in_groups_api` feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!62454
parents 5b2de41b 93394180
---
name: limit_projects_in_groups_api
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20023
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/257829
milestone: '12.6'
type: development
group: group::access
default_enabled: true
...@@ -29,11 +29,7 @@ module API ...@@ -29,11 +29,7 @@ module API
end end
def projects_limit def projects_limit
if ::Feature.enabled?(:limit_projects_in_groups_api, default_enabled: true)
GroupProjectsFinder::DEFAULT_PROJECTS_LIMIT GroupProjectsFinder::DEFAULT_PROJECTS_LIMIT
else
nil
end
end end
end end
end end
......
...@@ -631,11 +631,6 @@ RSpec.describe API::Groups do ...@@ -631,11 +631,6 @@ RSpec.describe API::Groups do
end end
end end
context 'when limiting feature is enabled' do
before do
stub_feature_flags(limit_projects_in_groups_api: true)
end
it 'limits projects and shared_projects' do it 'limits projects and shared_projects' do
get api("/groups/#{group1.id}") get api("/groups/#{group1.id}")
...@@ -643,20 +638,6 @@ RSpec.describe API::Groups do ...@@ -643,20 +638,6 @@ RSpec.describe API::Groups do
expect(json_response['shared_projects'].count).to eq(limit) expect(json_response['shared_projects'].count).to eq(limit)
end end
end end
context 'when limiting feature is not enabled' do
before do
stub_feature_flags(limit_projects_in_groups_api: false)
end
it 'does not limit projects and shared_projects' do
get api("/groups/#{group1.id}")
expect(json_response['projects'].count).to eq(3)
expect(json_response['shared_projects'].count).to eq(3)
end
end
end
end end
describe 'PUT /groups/:id' do describe 'PUT /groups/:id' do
......
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