Enable Nova and Glance tempest tests
This commit resolves errors of nova, glance tempest tests and enables them to run on gate. It still skips neutron tests for now and will enabled in other patch, as it needs some more investigation to enable them. Partial-Bug:#1486246 Change-Id: I5d69ed515496aa259833a3519c12197496afad2f
This commit is contained in:
parent
eee90af2a1
commit
9c26bc0e3a
|
@ -16,7 +16,6 @@ from oslo_log import log as logging
|
|||
from tempest import clients # noqa
|
||||
from tempest import config # noqa
|
||||
from tempest import test # noqa
|
||||
from tempest_lib import decorators
|
||||
from tempest_lib import exceptions
|
||||
|
||||
from congress_tempest_tests.tests.scenario import manager_congress # noqa
|
||||
|
@ -48,7 +47,6 @@ class TestGlanceV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
cls.datasource_id = manager_congress.get_datasource_id(
|
||||
cls.admin_manager.congress_client, 'glancev2')
|
||||
|
||||
@decorators.skip_because(bug='1486246')
|
||||
@test.attr(type='smoke')
|
||||
@test.services('image')
|
||||
def test_glancev2_images_table(self):
|
||||
|
@ -61,7 +59,7 @@ class TestGlanceV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
def _check_data_table_glancev2_images():
|
||||
# Fetch data from glance each time, because this test may start
|
||||
# before glance has all the users.
|
||||
images = self.glancev2.list_images()
|
||||
images = self.glancev2.list_images()['images']
|
||||
image_map = {}
|
||||
for image in images:
|
||||
image_map[image['id']] = image
|
||||
|
@ -95,14 +93,13 @@ class TestGlanceV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
raise exceptions.TimeoutException("Data did not converge in time "
|
||||
"or failure in server")
|
||||
|
||||
@decorators.skip_because(bug='1486246')
|
||||
@test.attr(type='smoke')
|
||||
@test.services('image')
|
||||
def test_glancev2_tags_table(self):
|
||||
def _check_data_table_glance_images():
|
||||
# Fetch data from glance each time, because this test may start
|
||||
# before glance has all the users.
|
||||
images = self.glancev2.list_images()
|
||||
images = self.glancev2.list_images()['images']
|
||||
image_tag_map = {}
|
||||
for image in images:
|
||||
image_tag_map[image['id']] = image['tags']
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
from tempest_lib import decorators
|
||||
from tempest_lib import exceptions
|
||||
|
||||
from tempest import config # noqa
|
||||
|
@ -49,7 +48,6 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
|
|||
self.datasource_id = manager_congress.get_datasource_id(
|
||||
self.admin_manager.congress_client, 'nova')
|
||||
|
||||
@decorators.skip_because(bug='1486246')
|
||||
@test.attr(type='smoke')
|
||||
@test.services('compute', 'network')
|
||||
def test_nova_datasource_driver_servers(self):
|
||||
|
@ -67,6 +65,10 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
|
|||
return 'image'
|
||||
elif col == 'flavor_id':
|
||||
return 'flavor'
|
||||
elif col == 'zone':
|
||||
return 'OS-EXT-AZ:availability_zone'
|
||||
elif col == 'host_name':
|
||||
return 'OS-EXT-SRV-ATTR:hypervisor_hostname'
|
||||
else:
|
||||
return col
|
||||
|
||||
|
@ -81,6 +83,11 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
|
|||
for index in range(len(keys)):
|
||||
if keys[index] in ['image', 'flavor']:
|
||||
val = self.servers[0][keys[index]]['id']
|
||||
# Test servers created doesn't have this attribute,
|
||||
# so ignoring the same in tempest tests.
|
||||
elif keys[index] in \
|
||||
['OS-EXT-SRV-ATTR:hypervisor_hostname']:
|
||||
continue
|
||||
else:
|
||||
val = self.servers[0][keys[index]]
|
||||
|
||||
|
@ -96,7 +103,6 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
|
|||
raise exceptions.TimeoutException("Data did not converge in time "
|
||||
"or failure in server")
|
||||
|
||||
@decorators.skip_because(bug='1486246')
|
||||
@test.attr(type='smoke')
|
||||
@test.services('compute', 'network')
|
||||
def test_nova_datasource_driver_flavors(self):
|
||||
|
@ -105,7 +111,7 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
|
|||
# before nova has all the users.
|
||||
flavors = self.flavors_client.list_flavors(detail=True)
|
||||
flavor_id_map = {}
|
||||
for flavor in flavors:
|
||||
for flavor in flavors['flavors']:
|
||||
flavor_id_map[flavor['id']] = flavor
|
||||
|
||||
results = (
|
||||
|
|
|
@ -108,7 +108,8 @@ class ScenarioPolicyBase(manager.NetworkScenarioTest):
|
|||
'key_name': keypair['name'],
|
||||
'security_groups': security_groups,
|
||||
}
|
||||
server = self.create_server(name=name, create_kwargs=create_kwargs)
|
||||
server = self.create_server(name=name, wait_until='ACTIVE',
|
||||
**create_kwargs)
|
||||
self.servers.append(server)
|
||||
return server
|
||||
|
||||
|
|
Loading…
Reference in New Issue