Commit ceaad325 authored by Dmitry Gruzd's avatar Dmitry Gruzd Committed by Jan Provaznik

Remove the elasticsearch_web_indexing feature flag

parent 310511c7
# frozen_string_literal: true
class Admin::ElasticsearchController < Admin::ApplicationController
before_action :check_elasticsearch_web_indexing_feature_flag!
def check_elasticsearch_web_indexing_feature_flag!
render_404 unless Feature.enabled?(:elasticsearch_web_indexing, default_enabled: true)
end
# POST
# Scheduling indexing jobs
def enqueue_index
......
......@@ -28,7 +28,7 @@
- unless Gitlab::CurrentSettings.elasticsearch_indexing?
.form-text.text-muted
= _('Please create an index before enabling indexing')
- if Feature.enabled?(:elasticsearch_web_indexing, default_enabled: true) && Gitlab::CurrentSettings.elasticsearch_indexing?
- if Gitlab::CurrentSettings.elasticsearch_indexing?
.form-text
= link_to _('Index all projects'), admin_elasticsearch_enqueue_index_path,
class: ['btn', 'btn-success'], method: :post
......
......@@ -36,17 +36,5 @@ RSpec.describe Admin::ElasticsearchController do
expect(response).to redirect_to integrations_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
end
end
context 'when feature is disabled' do
it 'does nothing and returns 404' do
stub_feature_flags(elasticsearch_web_indexing: false)
expect(::Elastic::IndexProjectsService).not_to receive(:new)
post :enqueue_index
expect(response).to have_gitlab_http_status(:not_found)
end
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