Commit ddee4426 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'qa-refactor-quarantine-helper' into 'master'

Refactor quarantine helper

See merge request gitlab-org/gitlab-ce!27766
parents 12e7f1da 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment