summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorWalmyr Lima <walmyr@gitlab.com>2019-04-26 18:33:41 +0200
committerWalmyr Lima <walmyr@gitlab.com>2019-04-26 19:16:40 +0200
commiteaba732e91e9b0d37d47e2cccacb1960daf95145 (patch)
tree3008b449de0cf7eff37d739b9eb9e8c6085ec1ff /qa
parentbb6908cd5bcb14d70dfadbc2a16d7310bfa65445 (diff)
downloadgitlab-ce-eaba732e91e9b0d37d47e2cccacb1960daf95145.tar.gz
Refactor quarantine helper
By moving methods closer to where they are called.
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/specs/helpers/quarantine.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/qa/qa/specs/helpers/quarantine.rb b/qa/qa/specs/helpers/quarantine.rb
index 52cb05fcd13..ca0ce32e74f 100644
--- a/qa/qa/specs/helpers/quarantine.rb
+++ b/qa/qa/specs/helpers/quarantine.rb
@@ -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