Commit 4baf7e9e authored by Brandon Labuschagne's avatar Brandon Labuschagne Committed by Mark Chao

Add license check to devops_adoption

In this commit we also rename the feature flag
from devops_adoption to devops_adoption_feature
parent f8b87202
......@@ -3,7 +3,7 @@
.container
.gl-mt-3
- if Feature.enabled?(:devops_adoption)
- if Gitlab.ee? && Feature.enabled?(:devops_adoption_feature) && License.feature_available?(:devops_adoption)
= render_if_exists 'admin/dev_ops_report/devops_tabs'
- else
= render 'report'
......
---
name: devops_adoption
name: devops_adoption_feature
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46005
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/271568
type: development
......
......@@ -131,6 +131,7 @@ class License < ApplicationRecord
credentials_inventory
dast
dependency_scanning
devops_adoption
enterprise_templates
api_fuzzing
group_level_compliance_dashboard
......
......@@ -11,9 +11,9 @@ RSpec.describe 'DevOps Report page', :js do
sign_in(create(:admin))
end
context 'with devops_adoption feature flag disabled' do
context 'with devops_adoption_feature feature flag disabled' do
before do
stub_feature_flags(devops_adoption: false)
stub_feature_flags(devops_adoption_feature: false)
end
it 'does not show the tabbed layout' do
......@@ -23,7 +23,11 @@ RSpec.describe 'DevOps Report page', :js do
end
end
context 'with devops_adoption feature flag enabled' do
context 'with ultimate license and devops_adoption_feature feature flag enabled' do
before do
stub_licensed_features(devops_adoption: true)
end
it 'shows the tabbed layout' do
visit admin_dev_ops_report_path
......@@ -110,4 +114,16 @@ RSpec.describe 'DevOps Report page', :js do
end
end
end
context 'without ultimate license and devops_adoption_feature feature flag enabled' do
before do
stub_licensed_features(devops_adoption: false)
end
it 'does not show the tabbed layout' do
visit admin_dev_ops_report_path
expect(page).not_to have_selector tabs_selector
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