Commit 55fc6a65 authored by Peter Leitzen's avatar Peter Leitzen

Clearing licensed feature caches is not necessary anymore

parent 1a39f59e
......@@ -293,7 +293,6 @@ RSpec.describe API::ProjectMirror do
context 'when repository_mirrors feature is not available' do
before do
stub_licensed_features(repository_mirrors: false)
project_mirrored.clear_memoization(:licensed_feature_available)
end
it_behaves_like 'an API endpoint that does not trigger pull mirroring operation', :bad_request
......@@ -302,7 +301,6 @@ RSpec.describe API::ProjectMirror do
context 'when repository_mirrors feature is available' do
before do
stub_licensed_features(repository_mirrors: true)
project_mirrored.clear_memoization(:licensed_feature_available)
end
it_behaves_like 'an API endpoint that triggers pull mirroring operation'
......
......@@ -165,7 +165,6 @@ RSpec.describe Ci::ExternalPullRequests::ProcessGithubEventService do
let(:source_sha) { double }
before do
project.clear_memoization(:licensed_feature_available)
allow(project).to receive(:mirror?).and_return(true)
stub_licensed_features(ci_cd_projects: false, github_project_service_integration: false)
end
......
......@@ -16,10 +16,6 @@ RSpec.describe Dast::Profiles::CreateService do
subject { described_class.new(container: project, current_user: developer, params: params).execute }
describe 'execute' do
before do
project.clear_memoization(:licensed_feature_available)
end
context 'when on demand scan feature is disabled' do
it 'communicates failure' do
stub_licensed_features(security_on_demand_scans: true)
......
......@@ -18,10 +18,6 @@ RSpec.describe Dast::Profiles::DestroyService do
end
describe '#execute' do
before do
project.clear_memoization(:licensed_feature_available)
end
context 'when the feature flag dast_saved_scans is disabled' do
it 'communicates failure' do
stub_licensed_features(security_on_demand_scans: true)
......
......@@ -30,10 +30,6 @@ RSpec.describe Dast::Profiles::UpdateService do
end
describe 'execute', :clean_gitlab_redis_shared_state do
before do
project.clear_memoization(:licensed_feature_available)
end
context 'when on demand scan feature is disabled' do
it 'communicates failure' do
stub_licensed_features(security_on_demand_scans: true)
......
......@@ -12,10 +12,6 @@ RSpec.describe DastSiteValidations::CreateService do
subject { described_class.new(container: dast_site.project, params: params).execute }
describe 'execute', :clean_gitlab_redis_shared_state do
before do
project.clear_memoization(:licensed_feature_available)
end
context 'when on demand scan feature is disabled' do
it 'communicates failure' do
stub_licensed_features(security_on_demand_scans: true)
......
......@@ -16,10 +16,6 @@ RSpec.describe DastSiteValidations::RevokeService do
subject { described_class.new(container: project, params: params).execute }
describe 'execute', :clean_gitlab_redis_shared_state do
before do
project.clear_memoization(:licensed_feature_available)
end
context 'when on demand scan feature is disabled' do
it 'communicates failure' do
stub_licensed_features(security_on_demand_scans: true)
......
......@@ -16,11 +16,6 @@ RSpec.describe Projects::Prometheus::Alerts::NotifyService do
let(:subject) { service.execute(token_input) }
before do
# We use `let_it_be(:project)` so we make sure to clear caches
project.clear_memoization(:licensed_feature_available)
end
context 'with valid payload' do
let(:alert_firing) { create(:prometheus_alert, project: project) }
let(:alert_resolved) { create(:prometheus_alert, project: project) }
......
......@@ -62,7 +62,6 @@ Service.available_services_names.each do |service|
stub_licensed_features(licensed_feature => true)
project.clear_memoization(:disabled_services)
project.clear_memoization(:licensed_feature_available)
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