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
d32c03d3
Commit
d32c03d3
authored
Jun 24, 2019
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor specs for file registry finders
This commit removes code duplicate between these specs
parent
b3c29ef2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
93 deletions
+5
-93
ee/spec/finders/geo/attachment_registry_finder_spec.rb
ee/spec/finders/geo/attachment_registry_finder_spec.rb
+1
-21
ee/spec/finders/geo/job_artifact_registry_finder_spec.rb
ee/spec/finders/geo/job_artifact_registry_finder_spec.rb
+1
-21
ee/spec/finders/geo/lfs_object_registry_finder_spec.rb
ee/spec/finders/geo/lfs_object_registry_finder_spec.rb
+1
-21
ee/spec/support/shared_examples/finders/file_registry_finders.rb
.../support/shared_examples/finders/file_registry_finders.rb
+2
-30
No files found.
ee/spec/finders/geo/attachment_registry_finder_spec.rb
View file @
d32c03d3
...
...
@@ -456,25 +456,5 @@ describe Geo::AttachmentRegistryFinder, :geo, :geo_fdw do
end
end
it
'responds to file registry finder methods'
do
file_registry_finder_methods
=
%i{
syncable
count_syncable
count_synced
count_failed
count_synced_missing_on_primary
count_registry
find_unsynced
find_migrated_local
find_retryable_failed_registries
find_retryable_synced_missing_on_primary_registries
}
file_registry_finder_methods
.
each
do
|
method
|
expect
(
subject
).
to
respond_to
(
method
)
end
end
include_examples
'counts all the things'
include_examples
'finds all the things'
it_behaves_like
'a file registry finder'
end
ee/spec/finders/geo/job_artifact_registry_finder_spec.rb
View file @
d32c03d3
...
...
@@ -563,25 +563,5 @@ describe Geo::JobArtifactRegistryFinder, :geo_fdw do
end
end
it
'responds to file registry finder methods'
do
file_registry_finder_methods
=
%i{
syncable
count_syncable
count_synced
count_failed
count_synced_missing_on_primary
count_registry
find_unsynced
find_migrated_local
find_retryable_failed_registries
find_retryable_synced_missing_on_primary_registries
}
file_registry_finder_methods
.
each
do
|
method
|
expect
(
subject
).
to
respond_to
(
method
)
end
end
include_examples
'counts all the things'
include_examples
'finds all the things'
it_behaves_like
'a file registry finder'
end
ee/spec/finders/geo/lfs_object_registry_finder_spec.rb
View file @
d32c03d3
...
...
@@ -642,25 +642,5 @@ describe Geo::LfsObjectRegistryFinder, :geo_fdw do
end
end
it
'responds to file registry finder methods'
do
file_registry_finder_methods
=
%i{
syncable
count_syncable
count_synced
count_failed
count_synced_missing_on_primary
count_registry
find_unsynced
find_migrated_local
find_retryable_failed_registries
find_retryable_synced_missing_on_primary_registries
}
file_registry_finder_methods
.
each
do
|
method
|
expect
(
subject
).
to
respond_to
(
method
)
end
end
include_examples
'counts all the things'
include_examples
'finds all the things'
it_behaves_like
'a file registry finder'
end
ee/spec/support/shared_examples/finders/file_registry_finders.rb
View file @
d32c03d3
...
...
@@ -18,34 +18,6 @@ shared_examples_for 'a file registry finder' do
end
end
# Disable transactions via :delete method because a foreign table
# can't see changes inside a transaction of a different connection.
context
'FDW'
,
:geo_fdw
,
:delete
do
context
'with use_fdw_queries_for_selective_sync disabled'
do
before
do
stub_feature_flags
(
use_fdw_queries_for_selective_sync:
false
)
end
include_examples
'counts all the things'
include_examples
'finds all the things'
end
context
'with use_fdw_queries_for_selective_sync enabled'
do
before
do
stub_feature_flags
(
use_fdw_queries_for_selective_sync:
true
)
end
include_examples
'counts all the things'
include_examples
'finds all the things'
end
end
context
'Legacy'
do
before
do
stub_fdw_disabled
end
include_examples
'counts all the things'
include_examples
'finds all the things'
end
include_examples
'counts all the things'
include_examples
'finds all the things'
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