BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
15f486e3
Commit
15f486e3
authored
Aug 21, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sidekiq worker shared examples to workers specs
parent
82056644
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
88 additions
and
2 deletions
+88
-2
authorized_projects_worker_spec.rb
spec/workers/authorized_projects_worker_spec.rb
+2
-0
background_migration_worker_spec.rb
spec/workers/background_migration_worker_spec.rb
+2
-0
create_gpg_signature_worker_spec.rb
spec/workers/create_gpg_signature_worker_spec.rb
+2
-0
delete_merged_branches_worker_spec.rb
spec/workers/delete_merged_branches_worker_spec.rb
+2
-0
delete_user_worker_spec.rb
spec/workers/delete_user_worker_spec.rb
+2
-0
email_receiver_worker_spec.rb
spec/workers/email_receiver_worker_spec.rb
+2
-0
emails_on_push_worker_spec.rb
spec/workers/emails_on_push_worker_spec.rb
+2
-0
every_sidekiq_worker_spec.rb
spec/workers/every_sidekiq_worker_spec.rb
+2
-0
expire_build_artifacts_worker_spec.rb
spec/workers/expire_build_artifacts_worker_spec.rb
+2
-0
expire_build_instance_artifacts_worker_spec.rb
spec/workers/expire_build_instance_artifacts_worker_spec.rb
+2
-0
git_garbage_collect_worker_spec.rb
spec/workers/git_garbage_collect_worker_spec.rb
+2
-0
gitlab_usage_ping_worker_spec.rb
spec/workers/gitlab_usage_ping_worker_spec.rb
+2
-0
group_destroy_worker_spec.rb
spec/workers/group_destroy_worker_spec.rb
+2
-0
invalid_gpg_signature_update_worker_spec.rb
spec/workers/invalid_gpg_signature_update_worker_spec.rb
+2
-0
merge_worker_spec.rb
spec/workers/merge_worker_spec.rb
+2
-0
namespaceless_project_destroy_worker_spec.rb
spec/workers/namespaceless_project_destroy_worker_spec.rb
+2
-0
new_issue_worker_spec.rb
spec/workers/new_issue_worker_spec.rb
+2
-0
new_merge_request_worker_spec.rb
spec/workers/new_merge_request_worker_spec.rb
+2
-0
new_note_worker_spec.rb
spec/workers/new_note_worker_spec.rb
+2
-0
pipeline_schedule_worker_spec.rb
spec/workers/pipeline_schedule_worker_spec.rb
+2
-0
pipeline_update_worker_spec.rb
spec/workers/pipeline_update_worker_spec.rb
+2
-2
post_receive_spec.rb
spec/workers/post_receive_spec.rb
+2
-0
process_commit_worker_spec.rb
spec/workers/process_commit_worker_spec.rb
+2
-0
project_cache_worker_spec.rb
spec/workers/project_cache_worker_spec.rb
+2
-0
project_destroy_worker_spec.rb
spec/workers/project_destroy_worker_spec.rb
+2
-0
propagate_service_template_worker_spec.rb
spec/workers/propagate_service_template_worker_spec.rb
+2
-0
prune_old_events_worker_spec.rb
spec/workers/prune_old_events_worker_spec.rb
+2
-0
reactive_caching_worker_spec.rb
spec/workers/reactive_caching_worker_spec.rb
+2
-0
remove_expired_group_links_worker_spec.rb
spec/workers/remove_expired_group_links_worker_spec.rb
+2
-0
remove_expired_members_worker_spec.rb
spec/workers/remove_expired_members_worker_spec.rb
+2
-0
remove_old_web_hook_logs_worker_spec.rb
spec/workers/remove_old_web_hook_logs_worker_spec.rb
+2
-0
remove_unreferenced_lfs_objects_worker_spec.rb
spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb
+2
-0
repository_fork_worker_spec.rb
spec/workers/repository_fork_worker_spec.rb
+2
-0
repository_import_worker_spec.rb
spec/workers/repository_import_worker_spec.rb
+2
-0
schedule_update_user_activity_worker_spec.rb
spec/workers/schedule_update_user_activity_worker_spec.rb
+2
-0
stuck_ci_jobs_worker_spec.rb
spec/workers/stuck_ci_jobs_worker_spec.rb
+2
-0
stuck_import_jobs_worker_spec.rb
spec/workers/stuck_import_jobs_worker_spec.rb
+2
-0
stuck_merge_jobs_worker_spec.rb
spec/workers/stuck_merge_jobs_worker_spec.rb
+2
-0
system_hook_push_worker_spec.rb
spec/workers/system_hook_push_worker_spec.rb
+2
-0
trending_projects_worker_spec.rb
spec/workers/trending_projects_worker_spec.rb
+2
-0
update_merge_requests_worker_spec.rb
spec/workers/update_merge_requests_worker_spec.rb
+2
-0
update_user_activity_worker_spec.rb
spec/workers/update_user_activity_worker_spec.rb
+2
-0
upload_checksum_worker_spec.rb
spec/workers/upload_checksum_worker_spec.rb
+2
-0
use_key_worker_spec.rb
spec/workers/use_key_worker_spec.rb
+2
-0
No files found.
spec/workers/authorized_projects_worker_spec.rb
View file @
15f486e3
...
...
@@ -47,4 +47,6 @@ describe AuthorizedProjectsWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/background_migration_worker_spec.rb
View file @
15f486e3
...
...
@@ -41,4 +41,6 @@ describe BackgroundMigrationWorker, :sidekiq do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/create_gpg_signature_worker_spec.rb
View file @
15f486e3
...
...
@@ -36,4 +36,6 @@ describe CreateGpgSignatureWorker do
described_class
.
new
.
perform
(
anything
,
nonexisting_project_id
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/delete_merged_branches_worker_spec.rb
View file @
15f486e3
...
...
@@ -16,4 +16,6 @@ describe DeleteMergedBranchesWorker do
expect
(
worker
.
perform
(
'unknown'
,
project
.
owner
.
id
)).
to
be_falsy
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/delete_user_worker_spec.rb
View file @
15f486e3
...
...
@@ -17,4 +17,6 @@ describe DeleteUserWorker do
described_class
.
new
.
perform
(
current_user
.
id
,
user
.
id
,
"test"
=>
"test"
)
end
it_behaves_like
'sidekiq worker'
end
spec/workers/email_receiver_worker_spec.rb
View file @
15f486e3
...
...
@@ -60,4 +60,6 @@ describe EmailReceiverWorker, :mailer do
described_class
.
new
.
perform
(
raw_message
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/emails_on_push_worker_spec.rb
View file @
15f486e3
...
...
@@ -127,4 +127,6 @@ describe EmailsOnPushWorker, :mailer do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/every_sidekiq_worker_spec.rb
View file @
15f486e3
...
...
@@ -41,4 +41,6 @@ describe 'Every Sidekiq worker' do
expect
(
queue_names
).
to
include
(
worker
.
sidekiq_options
[
'queue'
].
to_s
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/expire_build_artifacts_worker_spec.rb
View file @
15f486e3
...
...
@@ -47,4 +47,6 @@ describe ExpireBuildArtifactsWorker do
Sidekiq
::
Queues
.
jobs_by_worker
[
'ExpireBuildInstanceArtifactsWorker'
]
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/expire_build_instance_artifacts_worker_spec.rb
View file @
15f486e3
...
...
@@ -74,4 +74,6 @@ describe ExpireBuildInstanceArtifactsWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/git_garbage_collect_worker_spec.rb
View file @
15f486e3
...
...
@@ -131,6 +131,8 @@ describe GitGarbageCollectWorker do
end
end
it_behaves_like
'sidekiq worker'
# Create a new commit on a random new branch
def
create_objects
(
project
)
rugged
=
project
.
repository
.
rugged
...
...
spec/workers/gitlab_usage_ping_worker_spec.rb
View file @
15f486e3
...
...
@@ -10,4 +10,6 @@ describe GitlabUsagePingWorker do
subject
.
perform
end
it_behaves_like
'sidekiq worker'
end
spec/workers/group_destroy_worker_spec.rb
View file @
15f486e3
...
...
@@ -16,4 +16,6 @@ describe GroupDestroyWorker do
expect
(
Dir
.
exist?
(
project
.
path
)).
to
be_falsey
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/invalid_gpg_signature_update_worker_spec.rb
View file @
15f486e3
...
...
@@ -26,4 +26,6 @@ describe InvalidGpgSignatureUpdateWorker do
described_class
.
new
.
perform
(
nonexisting_gpg_key_id
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/merge_worker_spec.rb
View file @
15f486e3
...
...
@@ -38,4 +38,6 @@ describe MergeWorker do
expect
{
worker
.
perform
(
merge_request
.
id
,
user
.
id
,
{})
}
.
to
change
{
merge_request
.
reload
.
merge_jid
}.
from
(
nil
).
to
(
'999'
)
end
it_behaves_like
'sidekiq worker'
end
spec/workers/namespaceless_project_destroy_worker_spec.rb
View file @
15f486e3
...
...
@@ -76,4 +76,6 @@ describe NamespacelessProjectDestroyWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/new_issue_worker_spec.rb
View file @
15f486e3
...
...
@@ -51,4 +51,6 @@ describe NewIssueWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/new_merge_request_worker_spec.rb
View file @
15f486e3
...
...
@@ -53,4 +53,6 @@ describe NewMergeRequestWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/new_note_worker_spec.rb
View file @
15f486e3
...
...
@@ -46,4 +46,6 @@ describe NewNoteWorker do
described_class
.
new
.
perform
(
unexistent_note_id
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/pipeline_schedule_worker_spec.rb
View file @
15f486e3
...
...
@@ -62,4 +62,6 @@ describe PipelineScheduleWorker do
expect
{
subject
}.
not_to
change
{
project
.
pipelines
.
count
}
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/pipeline_update_worker_spec.rb
View file @
15f486e3
require
'spec_helper'
describe
PipelineUpdateWorker
do
it_behaves_like
'sidekiq worker'
describe
'#perform'
do
context
'when pipeline exists'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
...
...
@@ -21,4 +19,6 @@ describe PipelineUpdateWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/post_receive_spec.rb
View file @
15f486e3
...
...
@@ -140,4 +140,6 @@ describe PostReceive do
described_class
.
new
.
perform
(
gl_repository
,
key_id
,
base64_changes
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/process_commit_worker_spec.rb
View file @
15f486e3
...
...
@@ -134,4 +134,6 @@ describe ProcessCommitWorker do
expect
(
commit
.
authored_date
).
to
be_an_instance_of
(
Time
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/project_cache_worker_spec.rb
View file @
15f486e3
...
...
@@ -87,4 +87,6 @@ describe ProjectCacheWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/project_destroy_worker_spec.rb
View file @
15f486e3
...
...
@@ -33,4 +33,6 @@ describe ProjectDestroyWorker do
end
.
not_to
raise_error
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/propagate_service_template_worker_spec.rb
View file @
15f486e3
...
...
@@ -26,4 +26,6 @@ describe PropagateServiceTemplateWorker do
subject
.
perform
(
service_template
.
id
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/prune_old_events_worker_spec.rb
View file @
15f486e3
...
...
@@ -23,4 +23,6 @@ describe PruneOldEventsWorker do
expect
(
exactly_12_months_event
).
to
be_present
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/reactive_caching_worker_spec.rb
View file @
15f486e3
...
...
@@ -12,4 +12,6 @@ describe ReactiveCachingWorker do
subject
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/remove_expired_group_links_worker_spec.rb
View file @
15f486e3
...
...
@@ -21,4 +21,6 @@ describe RemoveExpiredGroupLinksWorker do
expect
(
non_expiring_project_group_link
.
reload
).
to
be_present
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/remove_expired_members_worker_spec.rb
View file @
15f486e3
...
...
@@ -55,4 +55,6 @@ describe RemoveExpiredMembersWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/remove_old_web_hook_logs_worker_spec.rb
View file @
15f486e3
...
...
@@ -15,4 +15,6 @@ describe RemoveOldWebHookLogsWorker do
expect
(
WebHookLog
.
all
).
not_to
include
(
week_old_record
,
three_days_old_record
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb
View file @
15f486e3
...
...
@@ -52,4 +52,6 @@ describe RemoveUnreferencedLfsObjectsWorker do
expect
(
LfsObject
.
where
(
id:
referenced_lfs_object2
.
id
)).
to
be_empty
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/repository_fork_worker_spec.rb
View file @
15f486e3
...
...
@@ -69,4 +69,6 @@ describe RepositoryForkWorker do
expect
(
project
.
reload
.
import_status
).
to
eq
(
'failed'
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/repository_import_worker_spec.rb
View file @
15f486e3
...
...
@@ -43,4 +43,6 @@ describe RepositoryImportWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/schedule_update_user_activity_worker_spec.rb
View file @
15f486e3
...
...
@@ -22,4 +22,6 @@ describe ScheduleUpdateUserActivityWorker, :clean_gitlab_redis_shared_state do
subject
.
perform
(
1
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/stuck_ci_jobs_worker_spec.rb
View file @
15f486e3
...
...
@@ -132,4 +132,6 @@ describe StuckCiJobsWorker do
worker
.
perform
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/stuck_import_jobs_worker_spec.rb
View file @
15f486e3
...
...
@@ -33,4 +33,6 @@ describe StuckImportJobsWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/stuck_merge_jobs_worker_spec.rb
View file @
15f486e3
...
...
@@ -47,4 +47,6 @@ describe StuckMergeJobsWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/system_hook_push_worker_spec.rb
View file @
15f486e3
...
...
@@ -16,4 +16,6 @@ describe SystemHookPushWorker do
subject
.
perform
(
push_data
,
:push_hooks
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/trending_projects_worker_spec.rb
View file @
15f486e3
...
...
@@ -8,4 +8,6 @@ describe TrendingProjectsWorker do
described_class
.
new
.
perform
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/update_merge_requests_worker_spec.rb
View file @
15f486e3
...
...
@@ -24,4 +24,6 @@ describe UpdateMergeRequestsWorker do
perform
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/update_user_activity_worker_spec.rb
View file @
15f486e3
...
...
@@ -32,4 +32,6 @@ describe UpdateUserActivityWorker, :clean_gitlab_redis_shared_state do
expect
(
Gitlab
::
UserActivities
.
new
.
to_a
).
to
be_empty
end
it_behaves_like
'sidekiq worker'
end
spec/workers/upload_checksum_worker_spec.rb
View file @
15f486e3
...
...
@@ -16,4 +16,6 @@ describe UploadChecksumWorker do
expect
(
upload
).
to
have_received
(
:save!
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/use_key_worker_spec.rb
View file @
15f486e3
...
...
@@ -20,4 +20,6 @@ describe UseKeyWorker do
expect
(
worker
.
perform
(
key
.
id
+
1
)).
to
eq
false
end
end
it_behaves_like
'sidekiq worker'
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