From 0bd203fb037c110a11b9fc0a95a40441b061f663 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Fri, 8 Jun 2018 11:33:42 +0200 Subject: [PATCH] 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 --- ...-test-with-multiple-plugin-version-13ed695ad2d8fab1.yaml | 6 ++++++ sahara_tempest_plugin/tests/cli/node_group_templates.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/fix-ngt-create-cli-test-with-multiple-plugin-version-13ed695ad2d8fab1.yaml diff --git a/releasenotes/notes/fix-ngt-create-cli-test-with-multiple-plugin-version-13ed695ad2d8fab1.yaml b/releasenotes/notes/fix-ngt-create-cli-test-with-multiple-plugin-version-13ed695ad2d8fab1.yaml new file mode 100644 index 00000000..ac9bac21 --- /dev/null +++ b/releasenotes/notes/fix-ngt-create-cli-test-with-multiple-plugin-version-13ed695ad2d8fab1.yaml @@ -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. diff --git a/sahara_tempest_plugin/tests/cli/node_group_templates.py b/sahara_tempest_plugin/tests/cli/node_group_templates.py index d8349d80..9dd5c69c 100644 --- a/sahara_tempest_plugin/tests/cli/node_group_templates.py +++ b/sahara_tempest_plugin/tests/cli/node_group_templates.py @@ -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(