Skip to content
Snippets Groups Projects
Commit aabf412b authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 1cfd8874
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -28,12 +28,17 @@ Service.available_services_names.each do |service|
end
end
 
let(:licensed_features) do
{
'github' => :github_project_service_integration,
'jenkins' => :jenkins_integration,
'jenkins_deprecated' => :jenkins_integration,
'alerts' => :incident_management
}
end
before do
if service == 'github' && respond_to?(:stub_licensed_features)
stub_licensed_features(github_project_service_integration: true)
project.clear_memoization(:disabled_services)
project.clear_memoization(:licensed_feature_available)
end
enable_license_for_service(service)
end
 
def initialize_service(service)
Loading
Loading
@@ -42,5 +47,18 @@ Service.available_services_names.each do |service|
service_item.save!
service_item
end
private
def enable_license_for_service(service)
return unless respond_to?(:stub_licensed_features)
licensed_feature = licensed_features[service]
return unless licensed_feature
stub_licensed_features(licensed_feature => true)
project.clear_memoization(:disabled_services)
project.clear_memoization(:licensed_feature_available)
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment