Add uninstall tests for toolchain

Change-Id: I84f7bbe72e2aa8b5ffdc4415cf93a82f2448a526
This commit is contained in:
vgusev 2016-05-27 15:44:43 +03:00
parent 6011c5560f
commit b155d624e2
2 changed files with 49 additions and 0 deletions

View File

@ -60,3 +60,11 @@ class ToolchainApi(object):
for plugin in self.plugins:
logger.info(msg.format(plugin.get_plugin_settings().name))
plugin.check_plugin_online()
def uninstall_plugins(self):
for plugin in self.plugins:
plugin.uninstall_plugin()
def check_uninstall_failure(self):
for plugin in self.plugins:
plugin.check_uninstall_failure()

View File

@ -118,3 +118,44 @@ class TestToolchain(api.ToolchainApi):
self.helpers.run_ostf()
self.env.make_snapshot("deploy_ha_toolchain", is_make=True)
@test(depends_on=[deploy_toolchain],
groups=["uninstall_deployed_toolchain", "uninstall", "toolchain",
"smoke"])
@log_snapshot_after_test
def uninstall_deployed_toolchain(self):
"""Uninstall the LMA Toolchain plugins with a deployed environment
Scenario:
1. Try to remove the plugins using the Fuel CLI
2. Check plugins can't be uninstalled on deployed cluster.
3. Remove the environment.
4. Remove the plugins.
Duration 20m
"""
self.env.revert_snapshot("deploy_toolchain")
self.check_uninstall_failure()
self.fuel_web.delete_env_wait(self.helpers.cluster_id)
self.uninstall_plugins()
@test(depends_on_groups=["prepare_slaves_3"],
groups=["uninstall_toolchain", "uninstall", "toolchain", "smoke"])
@log_snapshot_after_test
def uninstall_toolchain(self):
"""Uninstall the LMA Toolchain plugins
Scenario:
1. Install the plugins.
2. Remove the plugins.
Duration 5m
"""
self.env.revert_snapshot("ready_with_3_slaves")
self.prepare_plugins()
self.uninstall_plugins()