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
3219afff
Commit
3219afff
authored
Feb 16, 2018
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make :migration specs a little more robust
E.g.
https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/52873034
parent
293c51e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
spec/spec_helper.rb
spec/spec_helper.rb
+16
-0
No files found.
spec/spec_helper.rb
View file @
3219afff
...
@@ -154,6 +154,22 @@ RSpec.configure do |config|
...
@@ -154,6 +154,22 @@ RSpec.configure do |config|
Sidekiq
.
redis
(
&
:flushall
)
Sidekiq
.
redis
(
&
:flushall
)
end
end
# The :each scope runs "inside" the example, so this hook ensures the DB is in the
# correct state before any examples' before hooks are called. This prevents a
# problem where `ScheduleIssuesClosedAtTypeChange` (or any migration that depends
# on background migrations being run inline during test setup) can be broken by
# altering Sidekiq behavior in an unrelated spec like so:
#
# around do |example|
# Sidekiq::Testing.fake! do
# example.run
# end
# end
config
.
before
(
:context
,
:migration
)
do
schema_migrate_down!
end
# Each example may call `migrate!`, so we must ensure we are migrated down every time
config
.
before
(
:each
,
:migration
)
do
config
.
before
(
:each
,
:migration
)
do
schema_migrate_down!
schema_migrate_down!
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