Commit d51c4bb3 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '208723-check-feature-once' into 'master'

Remove feature flag

See merge request gitlab-org/gitlab!43200
parents 07205891 adaa4bd3
...@@ -79,8 +79,6 @@ module EE ...@@ -79,8 +79,6 @@ module EE
return license_scanning_report unless project.feature_available?(:license_scanning) return license_scanning_report unless project.feature_available?(:license_scanning)
each_report(::Ci::JobArtifact::LICENSE_SCANNING_REPORT_FILE_TYPES) do |file_type, blob| each_report(::Ci::JobArtifact::LICENSE_SCANNING_REPORT_FILE_TYPES) do |file_type, blob|
next if ::Feature.disabled?(:parse_license_management_reports, default_enabled: true)
::Gitlab::Ci::Parsers.fabricate!(file_type).parse!(blob, license_scanning_report) ::Gitlab::Ci::Parsers.fabricate!(file_type).parse!(blob, license_scanning_report)
end end
......
---
name: parse_license_management_reports
introduced_by_url:
rollout_issue_url:
group:
type: development
default_enabled: true
# frozen_string_literal: true # frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :ci_reports_license_scanning_report, class: '::Gitlab::Ci::Reports::LicenseScanning::Report', aliases: [:license_scan_report] do factory :ci_reports_license_scanning_report, class: '::Gitlab::Ci::Reports::LicenseScanning::Report', aliases: [:license_scan_report, :license_scanning_report] do
trait :version_1 do trait :version_1 do
version { '1.0' } version { '1.0' }
end end
......
...@@ -227,15 +227,15 @@ RSpec.describe Ci::Build do ...@@ -227,15 +227,15 @@ RSpec.describe Ci::Build do
describe '#collect_license_scanning_reports!' do describe '#collect_license_scanning_reports!' do
subject { job.collect_license_scanning_reports!(license_scanning_report) } subject { job.collect_license_scanning_reports!(license_scanning_report) }
let(:license_scanning_report) { Gitlab::Ci::Reports::LicenseScanning::Report.new } let(:license_scanning_report) { build(:license_scanning_report) }
before do
stub_licensed_features(license_scanning: true)
end
it { expect(license_scanning_report.licenses.count).to eq(0) } it { expect(license_scanning_report.licenses.count).to eq(0) }
context 'when build has a license scanning report' do context 'when the build has a license scanning report' do
before do
stub_licensed_features(license_scanning: true)
end
context 'when there is a new type report' do context 'when there is a new type report' do
before do before do
create(:ee_ci_job_artifact, :license_scanning, job: job, project: job.project) create(:ee_ci_job_artifact, :license_scanning, job: job, project: job.project)
...@@ -275,19 +275,6 @@ RSpec.describe Ci::Build do ...@@ -275,19 +275,6 @@ RSpec.describe Ci::Build do
end end
end end
context 'when Feature flag is disabled for License Scanning reports parsing' do
before do
stub_feature_flags(parse_license_management_reports: false)
create(:ee_ci_job_artifact, :license_scanning, job: job, project: job.project)
end
it 'does NOT parse license scanning report' do
subject
expect(license_scanning_report.licenses.count).to eq(0)
end
end
context 'when the license scanning feature is disabled' do context 'when the license scanning feature is disabled' do
before do before do
stub_licensed_features(license_scanning: false) stub_licensed_features(license_scanning: 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