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
5c3fd670
Commit
5c3fd670
authored
Jul 18, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for stage_id reference cleanup migration
parent
fa3acb3b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
spec/migrations/clean_stage_id_reference_migration_spec.rb
spec/migrations/clean_stage_id_reference_migration_spec.rb
+18
-11
No files found.
spec/migrations/clean_stage_id_reference_migration_spec.rb
View file @
5c3fd670
require
'spec_helper'
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20170710083355_clean_stage_id_reference_migration.rb'
)
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20170710083355_clean_stage_id_reference_migration.rb'
)
describe
CleanStageIdReferenceMigration
,
:migration
,
:sidekiq
do
describe
CleanStageIdReferenceMigration
,
:migration
,
:sidekiq
,
:redis
do
context
'when there are enqueued background migrations'
do
let
(
:migration
)
{
MigrateStageIdReferenceInBackground
::
MIGRATION
}
pending
'processes enqueued jobs synchronously'
do
fail
context
'when there are pending background migrations'
do
end
it
'processes enqueued jobs synchronously'
do
end
Sidekiq
::
Testing
.
disable!
do
BackgroundMigrationWorker
.
perform_in
(
2
.
minutes
,
migration
,
[
1
])
BackgroundMigrationWorker
.
perform_async
(
migration
,
[
1
])
expect
(
Gitlab
::
BackgroundMigration
).
to
receive
(
:perform
).
twice
context
'when there are scheduled background migrations'
do
migrate!
pending
'immediately processes scheduled jobs'
do
end
fail
end
end
end
end
context
'when there are no background migrations pending'
do
context
'when there are no background migrations pending'
do
pending
'does nothing'
do
it
'does nothing'
do
fail
Sidekiq
::
Testing
.
disable!
do
expect
(
Gitlab
::
BackgroundMigration
).
not_to
receive
(
:perform
)
migrate!
end
end
end
end
end
end
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