Always use an available plugin for CLI sahara test
The test is skipped if no plugins are specified in tempest configuration.
Otherwise, the first available one is used.
Change-Id: Ib50716cb96c103da24fd0e0f1b3cb4bfd484dea4
diff --git a/tempest/cli/simple_read_only/data_processing/test_sahara.py b/tempest/cli/simple_read_only/data_processing/test_sahara.py
index 1f2403c..c06c2c9 100644
--- a/tempest/cli/simple_read_only/data_processing/test_sahara.py
+++ b/tempest/cli/simple_read_only/data_processing/test_sahara.py
@@ -16,6 +16,7 @@
import re
from tempest_lib import exceptions
+import testtools
from tempest import cli
from tempest import config
@@ -59,8 +60,12 @@
'title'
])
+ @testtools.skipUnless(CONF.data_processing_feature_enabled.plugins,
+ 'No plugins defined')
def test_sahara_plugins_show(self):
- result = self.sahara('plugin-show', params='--name vanilla')
+ name_param = '--name %s' % \
+ (CONF.data_processing_feature_enabled.plugins[0])
+ result = self.sahara('plugin-show', params=name_param)
plugin = self.parser.listing(result)
self.assertTableStruct(plugin, [
'Property',