Skip in yaml tests can have multiple values
This commit is contained in:
@@ -152,15 +152,19 @@ class YamlTestCase(ElasticsearchTestCase):
|
|||||||
|
|
||||||
def run_skip(self, skip):
|
def run_skip(self, skip):
|
||||||
if 'features' in skip:
|
if 'features' in skip:
|
||||||
if skip['features'] in IMPLEMENTED_FEATURES:
|
features = skip['features']
|
||||||
return
|
if not isinstance(features, (tuple, list)):
|
||||||
elif skip['features'] == 'requires_replica':
|
features = [features]
|
||||||
if self._get_data_nodes() > 1:
|
for feature in features:
|
||||||
return
|
if feature in IMPLEMENTED_FEATURES:
|
||||||
elif skip['features'] == 'benchmark':
|
continue
|
||||||
if self._get_benchmark_nodes():
|
elif feature == 'requires_replica':
|
||||||
return
|
if self._get_data_nodes() > 1:
|
||||||
raise SkipTest(skip.get('reason', 'Feature %s is not supported' % skip['features']))
|
continue
|
||||||
|
elif feature == 'benchmark':
|
||||||
|
if self._get_benchmark_nodes():
|
||||||
|
continue
|
||||||
|
raise SkipTest(skip.get('reason', 'Feature %s is not supported' % feature))
|
||||||
|
|
||||||
if 'version' in skip:
|
if 'version' in skip:
|
||||||
version, reason = skip['version'], skip['reason']
|
version, reason = skip['version'], skip['reason']
|
||||||
|
|||||||
Reference in New Issue
Block a user