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
d010f667
Commit
d010f667
authored
Mar 29, 2018
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for synced scopes
parent
6aa5e3ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
ee/spec/models/geo/project_registry_spec.rb
ee/spec/models/geo/project_registry_spec.rb
+28
-0
No files found.
ee/spec/models/geo/project_registry_spec.rb
View file @
d010f667
...
...
@@ -17,6 +17,34 @@ describe Geo::ProjectRegistry do
it
{
is_expected
.
to
validate_uniqueness_of
(
:project
)
}
end
describe
'.synced_repos'
do
it
'returns clean projects where last attempt to sync succeeded'
do
expected
=
[]
expected
<<
create
(
:geo_project_registry
,
:synced
)
create
(
:geo_project_registry
,
:synced
,
:dirty
)
create
(
:geo_project_registry
,
:repository_syncing
)
expected
<<
create
(
:geo_project_registry
,
:wiki_syncing
)
expected
<<
create
(
:geo_project_registry
,
:wiki_sync_failed
)
create
(
:geo_project_registry
,
:repository_sync_failed
)
expect
(
described_class
.
synced_repos
).
to
match_array
(
expected
)
end
end
describe
'.synced_wikis'
do
it
'returns clean projects where last attempt to sync succeeded'
do
expected
=
[]
expected
<<
create
(
:geo_project_registry
,
:synced
)
create
(
:geo_project_registry
,
:synced
,
:dirty
)
expected
<<
create
(
:geo_project_registry
,
:repository_syncing
)
create
(
:geo_project_registry
,
:wiki_syncing
)
create
(
:geo_project_registry
,
:wiki_sync_failed
)
expected
<<
create
(
:geo_project_registry
,
:repository_sync_failed
)
expect
(
described_class
.
synced_wikis
).
to
match_array
(
expected
)
end
end
describe
'.failed_repos'
do
it
'returns projects where last attempt to sync failed'
do
create
(
:geo_project_registry
,
:synced
)
...
...
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