Add system test check Murano plugin services

Check that Murano services is alive after executing
setup_repositories command

Change-Id: I0609199d59b0023287bc1c62078eb6430bb9d27b
This commit is contained in:
OlehBaran 2016-10-11 16:41:22 +03:00 committed by Victor Ryzhenkin (freerunner)
parent 4c4cc0515c
commit f0b084433e
2 changed files with 57 additions and 0 deletions

View File

@ -708,3 +708,19 @@ class PluginHelper(object):
cmd=cmd)['stdout']
asserts.assert_true("ALL NODES UP-TO-DATE" in std_out[-1],
"Cluster wasn't updated")
def get_plugin_pid(self, service_name):
controller_ip = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
self.cluster_id, ['murano-node'])[0]['ip']
ps_output = self.ssh_manager.execute_on_remote(ip=controller_ip,
cmd='ps ax')['stdout']
api = [ps for ps in ps_output if service_name in ps]
return api
def compare_pid(self, old_pid, new_pid):
asserts.assert_equal(old_pid, new_pid,
'PID has changed after executing' \
'setup_repositories command')

View File

@ -132,3 +132,44 @@ class TestSystemMuranoPlugin(api.MuranoPluginApi):
self.run_ostf(['sanity', 'smoke', 'ha'])
self.env.make_snapshot("add_remove_murano_node", is_make=False)
@test(depends_on_groups=["deploy_murano_plugin_in_environment_with_murano"],
groups=["mirror", "system", "failover",
"create_mirror_and_check_murano_services"])
@log_snapshot_after_test
def create_mirror_and_check_murano_services(self):
"""Verify that Murano services is alive after fuel create mirror
Scenario:
1. Revert snapshot with deployed cluster
(deploy_murano_plugin_in_environment_with_murano)
2. Save PID of the plugin services
3. Execute setup_repositories command for murano-node
from master node
4. Check that PID wasn't changed
5. Check that plugin is working
6. Run Murano Platform OSTF
Duration 45m
Snapshot create_mirror_and_check_murano_services
"""
self.env.revert_snapshot(
"deploy_murano_plugin_in_environment_with_murano")
pid = self.helpers.get_plugin_pid('murano')
self.helpers.fuel_create_repositories(
self.helpers.get_all_ready_nodes())
new_pid = self.helpers.get_plugin_pid('murano')
self.helpers.compare_pid(pid, new_pid)
self.check_plugin_online()
self.run_ostf(['sanity', 'smoke', 'ha'])
self.check_plugin_online()
self.env.make_snapshot("create_mirror_and_check_murano_services",
is_make=False)