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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
ce274fd6
Commit
ce274fd6
authored
Aug 21, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to check if worker uses a known queue
parent
0f01ce36
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
config/sidekiq_queues.yml
config/sidekiq_queues.yml
+1
-0
spec/support/shared_examples/sidekiq_worker_shared_examples.rb
...support/shared_examples/sidekiq_worker_shared_examples.rb
+10
-0
spec/workers/pipeline_update_worker_spec.rb
spec/workers/pipeline_update_worker_spec.rb
+2
-0
No files found.
config/sidekiq_queues.yml
View file @
ce274fd6
...
...
@@ -27,6 +27,7 @@
- [new_merge_request, 2]
- [build, 2]
- [pipeline, 2]
- [pipelines-pipeline-processing, 2]
- [gitlab_shell, 2]
- [email_receiver, 2]
- [emails_on_push, 2]
...
...
spec/support/shared_examples/sidekiq_worker_shared_examples.rb
0 → 100644
View file @
ce274fd6
shared_examples
'sidekiq worker'
do
let
(
:queues
)
do
YAML
.
load_file
(
Rails
.
root
.
join
(
'config'
,
'sidekiq_queues.yml'
))
.
fetch
(
:queues
,
[]).
map
(
&
:first
)
end
it
'is going to be processed inside a known sidekiq queue'
do
expect
(
described_class
.
sidekiq_options
[
'queue'
]).
to
be_in
queues
end
end
spec/workers/pipeline_update_worker_spec.rb
View file @
ce274fd6
require
'spec_helper'
describe
PipelineUpdateWorker
do
it_behaves_like
'sidekiq worker'
describe
'#perform'
do
context
'when pipeline exists'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
...
...
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