Commit 688ac0b4 authored by Andrei Cirnici's avatar Andrei Cirnici

Remove without_index_namespace_callback trait

parent 9a94cae5
---
title: Remove without_index_namespace_callback trait
merge_request: 42082
author:
type: other
......@@ -47,17 +47,5 @@ FactoryBot.define do
trait :gold do
association :hosted_plan, factory: :gold_plan
end
# for testing elasticsearch_indexed_namespace and elastic_namespace_rollout_worker which
# eventually will not be required once all paid groups are indexed
trait :without_index_namespace_callback do
after(:build) do |gitlab_subcription|
GitlabSubscription.skip_callback(:commit, :after, :index_namespace)
end
after(:create) do
GitlabSubscription.set_callback(:commit, :after, :index_namespace)
end
end
end
end
......@@ -41,9 +41,9 @@ RSpec.describe ElasticsearchIndexedNamespace do
end
let_it_be(:namespaces) { create_list(:namespace, 3) }
let_it_be(:subscription1) { create(:gitlab_subscription, :without_index_namespace_callback, namespace: namespaces[2]) }
let_it_be(:subscription2) { create(:gitlab_subscription, :without_index_namespace_callback, namespace: namespaces[0]) }
let_it_be(:subscription3) { create(:gitlab_subscription, :silver, :without_index_namespace_callback, namespace: namespaces[1]) }
let_it_be(:subscription1) { create(:gitlab_subscription, namespace: namespaces[2]) }
let_it_be(:subscription2) { create(:gitlab_subscription, namespace: namespaces[0]) }
let_it_be(:subscription3) { create(:gitlab_subscription, :silver, namespace: namespaces[1]) }
before do
stub_ee_application_setting(elasticsearch_indexing: false)
......
......@@ -15,7 +15,7 @@ RSpec.describe ElasticNamespaceRolloutWorker do
before_all do
Plan::PAID_HOSTED_PLANS.each do |plan|
create_list(:gitlab_subscription, 4, :without_index_namespace_callback, hosted_plan: public_send("#{plan}_plan"))
create_list(:gitlab_subscription, 4, hosted_plan: public_send("#{plan}_plan"))
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