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
cd570488
Commit
cd570488
authored
Jun 29, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up after finishing spec by destroying jobs that were added
parent
a6c7263d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
spec/lib/gitlab/geo_spec.rb
spec/lib/gitlab/geo_spec.rb
+7
-2
No files found.
spec/lib/gitlab/geo_spec.rb
View file @
cd570488
...
@@ -121,6 +121,8 @@ describe Gitlab::Geo, lib: true do
...
@@ -121,6 +121,8 @@ describe Gitlab::Geo, lib: true do
end
end
describe
'.configure_cron_jobs!'
do
describe
'.configure_cron_jobs!'
do
JOBS
=
%w(ldap_test geo_bulk_notify_worker geo_repository_sync_worker geo_file_download_dispatch_worker)
.
freeze
def
init_cron_job
(
job_name
,
class_name
)
def
init_cron_job
(
job_name
,
class_name
)
job
=
Sidekiq
::
Cron
::
Job
.
new
(
job
=
Sidekiq
::
Cron
::
Job
.
new
(
name:
job_name
,
name:
job_name
,
...
@@ -132,8 +134,11 @@ describe Gitlab::Geo, lib: true do
...
@@ -132,8 +134,11 @@ describe Gitlab::Geo, lib: true do
end
end
before
(
:all
)
do
before
(
:all
)
do
jobs
=
%w(ldap_test geo_bulk_notify_worker geo_repository_sync_worker geo_file_download_dispatch_worker)
JOBS
.
each
{
|
job
|
init_cron_job
(
job
,
job
.
camelize
)
}
jobs
.
each
{
|
job
|
init_cron_job
(
job
,
job
.
camelize
)
}
end
after
(
:all
)
do
JOBS
.
each
{
|
job
|
Sidekiq
::
Cron
::
Job
.
find
(
job
)
&
.
destroy
}
end
end
it
'activates cron jobs for primary'
do
it
'activates cron jobs for primary'
do
...
...
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