Fix multiple typos in tests

- Fix check run snapshot names
- Add test for post-install on controllers
- Remove plugin activation in non-murano deployments

Change-Id: I61203f7f55c4840e05cfe7db703e9cbf91235868
This commit is contained in:
Victor Ryzhenkin 2016-09-01 20:04:44 +03:00
parent 5e79fce304
commit c3fe7c20a3
4 changed files with 72 additions and 52 deletions

View File

@ -195,6 +195,14 @@ class PluginHelper(object):
configure_ssl=ssl)
return self._cluster_id
def apply_changes(self, check_services=False):
"""Deploy changed cluster.
:param check_services: run OSTF after the deployment (default: False).
"""
self.fuel_web.deploy_cluster_wait(self.cluster_id,
check_services=check_services)
def deploy_cluster(self, nodes_roles, verify_network=False,
update_interfaces=True, check_services=True):
"""Assign roles to nodes and deploy the cluster.
@ -216,8 +224,7 @@ class PluginHelper(object):
update_interfaces=update_interfaces)
if verify_network:
self.fuel_web.verify_network(self.cluster_id)
self.fuel_web.deploy_cluster_wait(self.cluster_id,
check_services=check_services)
self.apply_changes(check_services=check_services)
def run_ostf(self, *args, **kwargs):
"""Run the OpenStack health checks."""

View File

@ -41,7 +41,7 @@ class TestMuranoPluginBvt(api.MuranoPluginApi):
Duration 90m
Snapshot deploy_murano_plugin_on_controller
"""
self.check_run("deploy_murano_plugin")
self.check_run("deploy_murano_plugin_on_controller")
self.env.revert_snapshot("ready_with_3_slaves")
@ -77,7 +77,7 @@ class TestMuranoPluginBvt(api.MuranoPluginApi):
Duration 90m
Snapshot deploy_murano_plugin_on_controller_ha
"""
self.check_run("deploy_murano_plugin")
self.check_run("deploy_murano_plugin_on_controller_ha")
self.env.revert_snapshot("ready_with_3_slaves")

View File

@ -43,17 +43,14 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi):
Snapshot deploy_murano_plugin_in_environment_with_murano
"""
self.check_run("deploy_environment_with_murano_plugin")
self.check_run("deploy_murano_plugin_in_environment_with_murano")
self.env.revert_snapshot("ready_with_3_slaves")
self.helpers.create_cluster(name=self.__class__.__name__,
settings={'murano': True})
self.helpers.deploy_cluster({
'slave-01': ['controller'],
'slave-02': ['compute'],
})
self.helpers.deploy_cluster(self.only_controllers)
self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
@ -61,18 +58,13 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi):
self.activate_plugin()
self.helpers.deploy_cluster({
'slave-01': ['controller'],
'slave-02': ['compute'],
})
self.check_plugin_online()
self.helpers.apply_changes()
self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
self.env.make_snapshot(
"deploy_murano_plugin_in_environment_with_murano",
is_make=True)
is_make=False)
@test(depends_on_groups=["prepare_slaves_3"],
groups=["deploy_murano_and_plugin_add_role", "deploy",
@ -101,24 +93,19 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi):
self.helpers.create_cluster(name=self.__class__.__name__,
settings={'murano': True})
self.helpers.deploy_cluster({
'slave-01': ['controller'],
'slave-02': ['compute'],
})
self.helpers.deploy_cluster(self.only_controllers)
self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
self.prepare_plugin()
self.activate_plugin(['sanity', 'smoke', 'tests_platform'])
self.activate_plugin()
self.helpers.deploy_cluster({
self.helpers.add_nodes_to_cluster({
'slave-03': plugin_settings.role_name,
})
self.check_plugin_online()
self.helpers.run_ostf()
self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
self.env.make_snapshot("deploy_murano_node_in_environment_with_murano",
is_make=True)
is_make=False)

View File

@ -26,8 +26,7 @@ class TestMuranoPostInstallation(api.MuranoPluginApi):
"""
@test(depends_on_groups=["prepare_slaves_3"],
groups=["deploy_environment_without_murano_plugin", "deploy",
"murano_plugin", "post_installation", 'murano'])
groups=["deploy_environment_without_murano_plugin", "deploy"])
@log_snapshot_after_test
def deploy_environment_without_murano_plugin(self):
"""Deploy a cluster without the Murano Detach plugin.
@ -36,11 +35,8 @@ class TestMuranoPostInstallation(api.MuranoPluginApi):
1. Create the cluster
2. Add 1 node with the controller role
3. Add 1 node with the compute and cinder roles
4. Upload the plugin to the master node
5. Install the plugin
6. Configure the plugin
8. Deploy cluster
8. Run OSTF
4. Deploy cluster
5. Run OSTF
Duration 60m
Snapshot deploy_environment_without_murano_plugin
@ -49,16 +45,9 @@ class TestMuranoPostInstallation(api.MuranoPluginApi):
self.env.revert_snapshot("ready_with_3_slaves")
self.prepare_plugin()
self.helpers.create_cluster(name=self.__class__.__name__)
self.activate_plugin()
self.helpers.deploy_cluster({
'slave-01': ['controller'],
'slave-02': ['compute', 'cinder'],
})
self.helpers.deploy_cluster(self.only_controllers)
self.run_ostf(['sanity', 'smoke', 'tests_platform'])
@ -66,30 +55,67 @@ class TestMuranoPostInstallation(api.MuranoPluginApi):
is_make=True)
@test(depends_on=[deploy_environment_without_murano_plugin],
groups=["deploy_murano_plugin_in_existing_environment", "deploy",
"murano_plugin", "post_installation", 'murano'])
groups=[
"deploy_murano_plugin_with_murano_node_in_existing_environment",
"deploy", "murano_plugin", "post_installation", 'murano'])
@log_snapshot_after_test
def deploy_murano_plugin_in_existing_environment(self):
"""Deploy the Murano Detach plugin in an existing environment.
def deploy_murano_plugin_with_murano_node_in_existing_environment(self):
"""Deploy Murano plugin with murano-node in an existing environment.
Scenario:
1. Revert snapshot with deployed cluster
2. Add 1 nodes with the plugin roles
3. Deploy the cluster
4. Check that Murano Detach plugin is running
5. Run OSTF
2. Upload and install plugin
3. Activate plugin
4. Add 1 nodes with the plugin roles
5. Deploy the cluster
6. Check that Murano Detach plugin is running
7. Run Murano Platform OSTF
Duration 60m
Snapshot deploy_murano_plugin_in_existing_environment
Snapshot deploy_murano_plugin_with_murano_node_in_existing_environment
"""
self.check_run("deploy_murano_plugin_in_existing_environment")
self.check_run(
"deploy_murano_plugin_with_murano_node_in_existing_environment")
self.env.revert_snapshot("deploy_environment_without_murano_plugin")
self.prepare_plugin()
self.activate_plugin()
self.helpers.deploy_cluster({
'slave-03': plugin_settings.role_name,
})
self.check_plugin_online()
self.run_ostf(['sanity', 'smoke', 'tests_platform'])
@test(depends_on=[deploy_environment_without_murano_plugin],
groups=["deploy_murano_plugin_on_controller_in_existing_environment",
"deploy", "murano_plugin", "post_installation", 'murano'])
@log_snapshot_after_test
def deploy_murano_plugin_on_controller_in_existing_environment(self):
"""Deploy Murano plugin with murano-node in an existing environment.
Scenario:
1. Revert snapshot with deployed cluster
2. Upload and install plugin
3. Activate plugin
4. Deploy the cluster
5. Check that Murano Detach plugin is running
6. Run Murano Platform OSTF
Duration 60m
Snapshot deploy_murano_plugin_on_controller_in_existing_environment
"""
self.check_run(
"deploy_murano_plugin_on_controller_in_existing_environment")
self.env.revert_snapshot("deploy_environment_without_murano_plugin")
self.prepare_plugin()
self.activate_plugin()
self.helpers.apply_changes()
self.check_plugin_online()