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
Boxiang Sun
gitlab-ce
Commits
beffbc8a
Commit
beffbc8a
authored
Jul 13, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix mocks in background migrations specs
parent
433b6d2c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
lib/gitlab/background_migration.rb
lib/gitlab/background_migration.rb
+0
-1
spec/lib/gitlab/background_migration_spec.rb
spec/lib/gitlab/background_migration_spec.rb
+5
-1
No files found.
lib/gitlab/background_migration.rb
View file @
beffbc8a
...
...
@@ -32,7 +32,6 @@ module Gitlab
# arguments - The arguments to pass to the background migration's "perform"
# method.
def
self
.
perform
(
class_name
,
arguments
)
puts
class_name
const_get
(
class_name
).
new
.
perform
(
*
arguments
)
end
end
...
...
spec/lib/gitlab/background_migration_spec.rb
View file @
beffbc8a
...
...
@@ -10,12 +10,16 @@ describe Gitlab::BackgroundMigration do
describe
'.steal'
do
context
'when there are enqueued jobs present'
do
let
(
:queue
)
{
[
double
(
:job
,
args:
[
'Foo'
,
[
10
,
20
]])]
}
let
(
:job
)
{
double
(
:job
,
args:
[
'Foo'
,
[
10
,
20
]])
}
let
(
:queue
)
{
[
job
]
}
before
do
allow
(
Sidekiq
::
Queue
).
to
receive
(
:new
)
.
with
(
described_class
.
queue
)
.
and_return
(
queue
)
allow
(
job
).
to
receive
(
:queue
)
.
and_return
(
described_class
.
queue
)
end
it
'steals jobs from a queue'
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