tempest: use tempest img

glance_image_create() must be called to upload the scenario-img to
glance. Since we upload it ourself, just use this one.

Change-Id: I030315796e68a9851f7a94b01a1e2cc8ac0a87ef
This commit is contained in:
Mehdi Abaakouk 2017-01-09 15:17:31 +01:00
parent a1dca0dabd
commit 7471d1bcfc

@ -15,20 +15,11 @@ import unittest
from gabbi import driver
from tempest import config
from tempest import test
from ceilometer.tests.tempest.service import client
from tempest.scenario import manager
class ClientManager(client.Manager):
load_clients = [
'image_client_v2',
]
class TestAutoscalingGabbi(test.BaseTestCase):
credentials = ['admin']
client_manager = ClientManager
class TestAutoscalingGabbi(manager.ScenarioTest):
credentials = ['admin', 'primary']
@classmethod
def skip_checks(cls):
@ -63,17 +54,6 @@ class TestAutoscalingGabbi(test.BaseTestCase):
auth, "orchestration")
os.environ["NOVA_SERVICE_URL"] = cls._get_endpoint_for(auth, "compute")
os.environ["GLANCE_SERVICE_URL"] = cls._get_endpoint_for(auth, "image")
images = cls.os_admin.image_client_v2.list_images()["images"]
for img in images:
name = img["name"]
# devstack or tempest format
if ((name.startswith("cirros") and name.endswith("-uec")) or
name == 'scenario-img'):
os.environ["GLANCE_IMAGE_NAME"] = name
break
else:
cls.skipException("A cirros-.*-uec/cirros image is required")
@staticmethod
def clear_credentials():
@ -85,6 +65,7 @@ class TestAutoscalingGabbi(test.BaseTestCase):
def run(self, result=None):
self.setUp()
os.environ["GLANCE_IMAGE_NAME"] = self.glance_image_create()
try:
self.tests.run(result)
finally: