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
end
def projects_limit
if ::Feature.enabled?(:limit_projects_in_groups_api, default_enabled: true)
GroupProjectsFinder::DEFAULT_PROJECTS_LIMIT
else
nil
end
GroupProjectsFinder::DEFAULT_PROJECTS_LIMIT
end
end
end
......
......@@ -631,30 +631,11 @@ RSpec.describe API::Groups do
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
get api("/groups/#{group1.id}")
expect(json_response['projects'].count).to eq(limit)
expect(json_response['shared_projects'].count).to eq(limit)
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}")
it 'limits 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
expect(json_response['projects'].count).to eq(limit)
expect(json_response['shared_projects'].count).to eq(limit)
end
end
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