diff options
author | Ramya Authappan <rauthappan@gitlab.com> | 2019-04-27 09:41:05 +0300 |
---|---|---|
committer | Ramya Authappan <rauthappan@gitlab.com> | 2019-04-27 09:41:05 +0300 |
commit | ddee4426c4bd3df8bde7936a6ffb0a1973a4d5a1 (patch) | |
tree | 6e2b36ded43a1dcda8b5b255b010be0e6d087b52 | |
parent | 12e7f1da67f879e1b6385f09ed4073cc4faaf7c0 (diff) | |
parent | eaba732e91e9b0d37d47e2cccacb1960daf95145 (diff) |
Merge branch 'qa-refactor-quarantine-helper' into 'master'
Refactor quarantine helper
See merge request gitlab-org/gitlab-ce!27766
-rw-r--r-- | qa/qa/specs/helpers/quarantine.rb | 16 |
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 |