Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][WIPTEST] Added required_test_flag check for non v2v tests #9934

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions cfme/utils/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,18 @@ def _filter_required_tags(self, provider):

def _filter_required_flags(self, provider):
""" Filters by required yaml flags """
required_test_flags = provider.data.get('required_test_flags', '')
if isinstance(required_test_flags, str):
required_test_flags = required_test_flags.split(',')
required_test_flags = [flag.strip() for flag in required_test_flags]

if self.required_flags is None:
if required_test_flags == ['']:
# Providers with no required_test_flags should not be filtered
return True
else:
# Providers with required_test_flags should be filtered like v2v
return False
return None
if self.required_flags:
test_flags = [flag.strip() for flag in self.required_flags]
Expand Down