Fix NGT creation test with multiple plugin versions

When more versions are available for a certain plugin,
only one of them should be passed to the test.

A similar fix was applied some time ago to another test:
https://review.openstack.org/383048

Change-Id: I9a5feb478fe51507c7a93caae3c4db27de1cdc6e
This commit is contained in:
Luigi Toscano 2018-06-08 11:33:42 +02:00
parent 5bf22956ee
commit 0bd203fb03
2 changed files with 8 additions and 2 deletions

View File

@ -0,0 +1,6 @@
---
fixes:
- |
The node group template creation test for the CLI client does not fail
anymore when the Sahara plugin selected for testing provides more than
one version.

View File

@ -30,13 +30,13 @@ class SaharaNodeGroupCLITest(base.ClientTestBase):
plugin = self.get_default_plugin()
id_net_pool = self.find_id_of_pool()
node_group_name = data_utils.rand_name(ng_type)
plugin_version = plugin['Versions'].split(',')[0].strip()
flags = ("%(ngt_name)s %(plugin)s %(plugin-version)s "
"%(processes)s %(flavor)s %(floating-pool)s"
% {'floating-pool': ' --floating-ip-pool %s' % id_net_pool,
'flavor': ' --flavor %s' % flavor_id,
'processes': ' --processes datanode',
'plugin-version': ' --plugin-version %s'
% plugin['Versions'],
'plugin-version': ' --plugin-version %s' % plugin_version,
'plugin': ' --plugin %s' % plugin['Name'],
'ngt_name': '--name %s' % node_group_name})
self.assertTableStruct(