Commit ab98b944 authored by David O'Regan's avatar David O'Regan

Merge branch 'tr-metric-image-feature-flag-removal' into 'master'

Remove the `incident_metric_upload_ui` feature flag

See merge request gitlab-org/gitlab!51552
parents 35522f85 0e7ea3cd
...@@ -21,7 +21,7 @@ class IssuableMetricImage < ApplicationRecord ...@@ -21,7 +21,7 @@ class IssuableMetricImage < ApplicationRecord
MAX_FILE_SIZE = 1.megabyte.freeze MAX_FILE_SIZE = 1.megabyte.freeze
def self.available_for?(project) def self.available_for?(project)
Feature.enabled?(:incident_metric_upload_ui, project) && project&.feature_available?(:incident_metric_upload) project&.feature_available?(:incident_metric_upload)
end end
def filename def filename
......
---
title: Add metric image feature for Incidents
merge_request: 51552
author:
type: added
---
name: incident_metric_upload_ui
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46731
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/293934
milestone: '13.8'
type: development
group: group::monitor
default_enabled: false
...@@ -84,7 +84,6 @@ RSpec.describe IssuablesHelper do ...@@ -84,7 +84,6 @@ RSpec.describe IssuablesHelper do
context 'when incident metric upload is available' do context 'when incident metric upload is available' do
before do before do
stub_licensed_features(incident_metric_upload: true) stub_licensed_features(incident_metric_upload: true)
stub_feature_flags(incident_metric_upload_ui: issue.project)
end end
let_it_be(:issue) { create(:issue, author: user, description: 'issue text', issue_type: :incident) } let_it_be(:issue) { create(:issue, author: user, description: 'issue text', issue_type: :incident) }
......
...@@ -44,23 +44,14 @@ RSpec.describe IssuableMetricImage do ...@@ -44,23 +44,14 @@ RSpec.describe IssuableMetricImage do
before do before do
stub_licensed_features(incident_metric_upload: true) stub_licensed_features(incident_metric_upload: true)
stub_feature_flags(incident_metric_upload_ui: true)
end end
let_it_be_with_refind(:issue) { create(:issue) } let_it_be_with_refind(:issue) { create(:issue) }
context 'license and feature flag enabled' do context 'license enabled' do
it { is_expected.to eq(true) } it { is_expected.to eq(true) }
end end
context 'feature flag disabled' do
before do
stub_feature_flags(incident_metric_upload_ui: false)
end
it { is_expected.to eq(false) }
end
context 'license disabled' do context 'license disabled' do
before do before do
stub_licensed_features(incident_metric_upload: false) stub_licensed_features(incident_metric_upload: false)
......
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