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
cc16e553
Commit
cc16e553
authored
Apr 02, 2018
by
Micaël Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backport missing object storage worker specs
parent
19c4918b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
spec/uploaders/workers/object_storage/background_move_worker_spec.rb
...ers/workers/object_storage/background_move_worker_spec.rb
+0
-0
spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb
...ers/workers/object_storage/migrate_uploads_worker_spec.rb
+4
-3
No files found.
ee/
spec/uploaders/workers/object_storage/background_move_worker_spec.rb
→
spec/uploaders/workers/object_storage/background_move_worker_spec.rb
View file @
cc16e553
File moved
ee/
spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb
→
spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb
View file @
cc16e553
...
...
@@ -9,6 +9,7 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
let!
(
:projects
)
{
create_list
(
:project
,
10
,
:with_avatar
)
}
let
(
:uploads
)
{
Upload
.
all
}
let
(
:model_class
)
{
Project
}
let
(
:mounted_as
)
{
:avatar
}
let
(
:to_store
)
{
ObjectStorage
::
Store
::
REMOTE
}
...
...
@@ -18,7 +19,7 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
describe
'.enqueue!'
do
def
enqueue!
described_class
.
enqueue!
(
uploads
,
mounted_as
,
to_store
)
described_class
.
enqueue!
(
uploads
,
Project
,
mounted_as
,
to_store
)
end
it
'is guarded by .sanity_check!'
do
...
...
@@ -44,7 +45,7 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
let
(
:mount_point
)
{
nil
}
it
do
expect
{
described_class
.
sanity_check!
(
uploads
,
mount_point
)
}
expect
{
described_class
.
sanity_check!
(
uploads
,
mo
del_class
,
mo
unt_point
)
}
.
to
raise_error
(
described_class
::
SanityCheckError
)
end
end
...
...
@@ -70,7 +71,7 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
describe
'#perform'
do
def
perform
described_class
.
new
.
perform
(
uploads
.
ids
,
mounted_as
,
to_store
)
described_class
.
new
.
perform
(
uploads
.
ids
,
mo
del_class
.
to_s
,
mo
unted_as
,
to_store
)
rescue
ObjectStorage
::
MigrateUploadsWorker
::
Report
::
MigrationFailures
# swallow
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