Fix cleanup, implement minor fixes
Change-Id: Ie3bc1655ec1007d8837245d715180e343b997c64
This commit is contained in:
parent
740bbcd9a7
commit
a181e99dcf
|
@ -181,15 +181,19 @@ def cleanup(cluster_deployment_info):
|
|||
def _delete_it(client, log_message, name='ost1_test-', delete_type='name'):
|
||||
try:
|
||||
for item in client.list():
|
||||
if item.name.startswith(name):
|
||||
try:
|
||||
LOG.info(log_message)
|
||||
if delete_type == 'name':
|
||||
client.delete(item)
|
||||
else:
|
||||
client.delete(item.id)
|
||||
except Exception as exc:
|
||||
LOG.debug(exc)
|
||||
try:
|
||||
if item.name.startswith(name):
|
||||
try:
|
||||
LOG.info(log_message)
|
||||
if delete_type == 'name':
|
||||
client.delete(item)
|
||||
else:
|
||||
client.delete(item.id)
|
||||
except Exception as exc:
|
||||
LOG.debug(exc)
|
||||
except AttributeError:
|
||||
if item.display_name.startswith(name):
|
||||
client.delete(item)
|
||||
except Exception as exc:
|
||||
LOG.warning(
|
||||
'Deletion is ommited due to error. Exception: %s', exc
|
||||
|
|
|
@ -147,7 +147,7 @@ class OfficialClientManager(fuel_health.manager.Manager):
|
|||
insecure=dscv)
|
||||
|
||||
def _get_heat_client(self, username=None, password=None,
|
||||
tenant_name=None):
|
||||
tenant_name=None):
|
||||
if not username:
|
||||
username = self.config.identity.admin_username
|
||||
if not password:
|
||||
|
|
|
@ -65,7 +65,7 @@ class TestMysqlReplication(nmanager.OfficialClientTest):
|
|||
5. Get replicated data from each controller.
|
||||
6. Verify that replicated data in the same from each controller
|
||||
7. Drop created database
|
||||
Duration: 1-40 s.
|
||||
Duration: 40 s.
|
||||
"""
|
||||
# Find mysql master node
|
||||
master_node_ip = []
|
||||
|
@ -148,13 +148,13 @@ class TestMysqlReplication(nmanager.OfficialClientTest):
|
|||
'database deletion', cmd)
|
||||
|
||||
def test_os_databases(self):
|
||||
"""Check amount of tables in os databases is the same on each node
|
||||
"""Check amount of tables in databases is the same on each node
|
||||
Target Service: HA mysql
|
||||
|
||||
Scenario:
|
||||
1. Request list of tables for os databases on each node.
|
||||
2. Check that amount of tables for each database is the same
|
||||
Duration: 1-40 s.
|
||||
Duration: 40 s.
|
||||
"""
|
||||
dbs = ['nova', 'glance', 'keystone']
|
||||
cmd = "mysql -e 'SHOW TABLES FROM %(database)s'"
|
||||
|
@ -195,7 +195,7 @@ class TestMysqlReplication(nmanager.OfficialClientTest):
|
|||
5. Verify that Slave_IO_State is in appropriate state
|
||||
6. Verify that Slave_IO_Running is in appropriate state
|
||||
7. Verify that Slave_SQL_Running is in appropriate state
|
||||
Duration: 1-40 s.
|
||||
Duration: 40 s.
|
||||
Deployment tags: RHEL
|
||||
"""
|
||||
|
||||
|
@ -276,7 +276,7 @@ class TestMysqlReplication(nmanager.OfficialClientTest):
|
|||
2. For each node check cluster size
|
||||
3. For each node check status is ready
|
||||
4. For each node check that node is connected to cluster
|
||||
Duration: 1-20 s.
|
||||
Duration: 20 s.
|
||||
Deployment tags: CENTOS
|
||||
"""
|
||||
if 'CentOS' in self.config.compute.deployment_os:
|
||||
|
@ -328,7 +328,7 @@ class TestMysqlReplication(nmanager.OfficialClientTest):
|
|||
2. For each node check cluster size
|
||||
3. For each node check status is ready
|
||||
4. For each node check that node is connected to cluster
|
||||
Duration: 1-20 s.
|
||||
Duration: 20 s.
|
||||
Deployment tags: Ubuntu
|
||||
"""
|
||||
if 'Ubuntu' in self.config.compute.deployment_os:
|
||||
|
@ -369,4 +369,3 @@ class TestMysqlReplication(nmanager.OfficialClientTest):
|
|||
failed_step='3')
|
||||
else:
|
||||
self.fail('There is no Ubuntu deployment')
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ class VolumesTest(nmanager.SmokeChecksTest):
|
|||
|
||||
def setUp(self):
|
||||
super(VolumesTest, self).setUp()
|
||||
if not self.config.volume.cinder_node_exist and not \
|
||||
self.config.volume.ceph_exist:
|
||||
if (not self.config.volume.cinder_node_exist
|
||||
and not self.config.volume.ceph_exist):
|
||||
self.fail('There are no cinder nodes or ceph storage for volume')
|
||||
if not self.config.compute.compute_nodes:
|
||||
self.fail('There are no compute nodes')
|
||||
|
|
|
@ -110,7 +110,7 @@ class TestImageAction(nmanager.SmokeChecksTest):
|
|||
6. Launch another instance from the snapshot created in step 2.
|
||||
Duration: 230 s.
|
||||
"""
|
||||
image = self.verify(5, nmanager.get_image_from_name, 1,
|
||||
image = self.verify(30, nmanager.get_image_from_name, 1,
|
||||
"Image can not be retreived.",
|
||||
"getting image by name")
|
||||
|
||||
|
|
Loading…
Reference in New Issue