Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
688ac0b4
Commit
688ac0b4
authored
Sep 17, 2020
by
Andrei Cirnici
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove without_index_namespace_callback trait
parent
9a94cae5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
16 deletions
+9
-16
ee/changelogs/unreleased/remove_without_index_namespace_callback_trait.yml
...eleased/remove_without_index_namespace_callback_trait.yml
+5
-0
ee/spec/factories/gitlab_subscriptions.rb
ee/spec/factories/gitlab_subscriptions.rb
+0
-12
ee/spec/models/elasticsearch_indexed_namespace_spec.rb
ee/spec/models/elasticsearch_indexed_namespace_spec.rb
+3
-3
ee/spec/workers/elastic_namespace_rollout_worker_spec.rb
ee/spec/workers/elastic_namespace_rollout_worker_spec.rb
+1
-1
No files found.
ee/changelogs/unreleased/remove_without_index_namespace_callback_trait.yml
0 → 100644
View file @
688ac0b4
---
title
:
Remove without_index_namespace_callback trait
merge_request
:
42082
author
:
type
:
other
ee/spec/factories/gitlab_subscriptions.rb
View file @
688ac0b4
...
...
@@ -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
ee/spec/models/elasticsearch_indexed_namespace_spec.rb
View file @
688ac0b4
...
...
@@ -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
)
...
...
ee/spec/workers/elastic_namespace_rollout_worker_spec.rb
View file @
688ac0b4
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment