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
eaba732e
Commit
eaba732e
authored
Apr 26, 2019
by
Walmyr Lima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor quarantine helper
By moving methods closer to where they are called.
parent
bb6908cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
qa/qa/specs/helpers/quarantine.rb
qa/qa/specs/helpers/quarantine.rb
+8
-8
No files found.
qa/qa/specs/helpers/quarantine.rb
View file @
eaba732e
...
...
@@ -20,6 +20,14 @@ module QA::Specs::Helpers
end
end
# Skip the entire context if a context is quarantined. This avoids running
# before blocks unnecessarily.
def
skip_or_run_quarantined_contexts
(
filters
,
example
)
return
unless
example
.
metadata
.
key?
(
:quarantine
)
skip_or_run_quarantined_tests_or_contexts
(
filters
,
example
)
end
# Skip tests in quarantine unless we explicitly focus on them.
def
skip_or_run_quarantined_tests_or_contexts
(
filters
,
example
)
if
filters
.
key?
(
:quarantine
)
...
...
@@ -39,14 +47,6 @@ module QA::Specs::Helpers
end
end
# Skip the entire context if a context is quarantined. This avoids running
# before blocks unnecessarily.
def
skip_or_run_quarantined_contexts
(
filters
,
example
)
return
unless
example
.
metadata
.
key?
(
:quarantine
)
skip_or_run_quarantined_tests_or_contexts
(
filters
,
example
)
end
def
filters_other_than_quarantine
(
filter
)
filter
.
reject
{
|
key
,
_
|
key
==
:quarantine
}
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