diff --git a/stacklight_tests/helpers/helpers.py b/stacklight_tests/helpers/helpers.py index 5c905ef..1a534df 100644 --- a/stacklight_tests/helpers/helpers.py +++ b/stacklight_tests/helpers/helpers.py @@ -559,3 +559,7 @@ class PluginHelper(object): start = time.time() raise TimeoutException("Timed out waiting to become {}".format( expected_status)) + + def get_fuel_release(self): + version = self.nailgun_client.get_api_version() + return version.get('release') diff --git a/stacklight_tests/toolchain/test_post_install.py b/stacklight_tests/toolchain/test_post_install.py index 14df3f5..8ae478a 100644 --- a/stacklight_tests/toolchain/test_post_install.py +++ b/stacklight_tests/toolchain/test_post_install.py @@ -71,6 +71,8 @@ class TestToolchainPostInstallation(api.ToolchainApi): 3. Configure the plugins 4. Add 3 nodes with the plugin roles 5. Deploy the cluster + 6. Redeploy the nodes that existed before the last deploy (MOS 8 + only) 6. Check that LMA Toolchain plugins are running 7. Run OSTF @@ -90,10 +92,13 @@ class TestToolchainPostInstallation(api.ToolchainApi): 'slave-04': settings.stacklight_roles, 'slave-05': settings.stacklight_roles }) - # The 'hiera' and post-deployment tasks have to be re-executed - # "manually" for the existing nodes - self.helpers.run_tasks(existing_nodes, tasks=['hiera'], - start="post_deployment_start", timeout=20 * 60) + if self.helpers.get_fuel_release() == '8.0': + # The 'hiera' and post-deployment tasks have to be re-executed + # "manually" for the existing nodes on MOS 8. With later versions + # of MOS, these tasks should be re-executed automatically. + self.helpers.run_tasks( + existing_nodes, tasks=['hiera'], start="post_deployment_start", + timeout=20 * 60) self.check_plugins_online()