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
c1f45237
Commit
c1f45237
authored
Nov 10, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo: Fix static analysis
parent
c5baa30f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
spec/models/geo/project_registry_spec.rb
spec/models/geo/project_registry_spec.rb
+1
-1
spec/services/geo/repository_sync_service_spec.rb
spec/services/geo/repository_sync_service_spec.rb
+7
-6
No files found.
spec/models/geo/project_registry_spec.rb
View file @
c1f45237
...
...
@@ -42,7 +42,7 @@ describe Geo::ProjectRegistry do
it
'returns projects that should be synced'
do
create
(
:geo_project_registry
,
repository_retry_at:
Date
.
yesterday
,
wiki_retry_at:
Date
.
yesterday
)
tomorrow
=
create
(
:geo_project_registry
,
repository_retry_at:
Date
.
tomorrow
,
wiki_retry_at:
Date
.
tomorrow
)
not_set_retry_at
=
create
(
:geo_project_registry
)
create
(
:geo_project_registry
)
expect
(
described_class
.
retry_due
).
not_to
include
(
tomorrow
)
end
...
...
spec/services/geo/repository_sync_service_spec.rb
View file @
c1f45237
...
...
@@ -162,29 +162,30 @@ describe Geo::RepositorySyncService do
context
'retries'
do
it
'tries to fetch repo'
do
registry
=
create
(
:geo_project_registry
,
project:
project
,
repository_retry_count:
Geo
::
BaseSyncService
::
RETRY_BEFORE_REDOWNLOAD
-
1
)
create
(
:geo_project_registry
,
project:
project
,
repository_retry_count:
Geo
::
BaseSyncService
::
RETRY_BEFORE_REDOWNLOAD
-
1
)
expect_any_instance_of
(
Geo
::
RepositorySyncService
).
to
receive
(
:fetch_project_repository
).
with
(
false
)
expect_any_instance_of
(
described_class
).
to
receive
(
:fetch_project_repository
).
with
(
false
)
subject
.
execute
end
it
'tries to redownload repo'
do
registry
=
create
(
:geo_project_registry
,
project:
project
,
repository_retry_count:
Geo
::
BaseSyncService
::
RETRY_BEFORE_REDOWNLOAD
+
1
)
create
(
:geo_project_registry
,
project:
project
,
repository_retry_count:
Geo
::
BaseSyncService
::
RETRY_BEFORE_REDOWNLOAD
+
1
)
expect_any_instance_of
(
Geo
::
RepositorySyncService
).
to
receive
(
:fetch_project_repository
).
with
(
true
)
expect_any_instance_of
(
described_class
).
to
receive
(
:fetch_project_repository
).
with
(
true
)
subject
.
execute
end
it
'tries to redownload repo when force_redownload flag is set'
do
registry
=
create
(
:geo_project_registry
,
create
(
:geo_project_registry
,
project:
project
,
repository_retry_count:
Geo
::
BaseSyncService
::
RETRY_BEFORE_REDOWNLOAD
-
1
,
force_to_redownload_repository:
true
)
expect_any_instance_of
(
Geo
::
RepositorySyncService
).
to
receive
(
:fetch_project_repository
).
with
(
true
)
expect_any_instance_of
(
described_class
).
to
receive
(
:fetch_project_repository
).
with
(
true
)
subject
.
execute
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