Wait until the image is registered in Sahara image test

The tests consistently fails, probably because the availability
of the image in the table is checked too soon. Add a bit of delay
with a new wait method.

Change-Id: I9e39c35fb67455b4e4f3c2b12265b8540420ad01
Closes-Bug: #1466744
This commit is contained in:
Luigi Toscano 2015-06-19 18:15:28 +02:00
parent 4ae89d4c24
commit 86d2d4a11b
2 changed files with 4 additions and 2 deletions

View File

@ -76,3 +76,6 @@ class ImageregistryPage(basepage.BaseNavigationPage):
self.register_form.user_name.text = user_name
self.register_form.description.text = description
self.register_form.submit.click()
def wait_until_image_registered(self, name):
self._wait_until(lambda x: self.is_image_registered(name))

View File

@ -16,8 +16,6 @@ from openstack_dashboard.test.integration_tests.tests import decorators
IMAGE_NAME = helpers.gen_random_resource_name("image")
# TODO(svasheka): Fix test_sahara_image_registry and turn it back on.
@decorators.skip_because(bugs=["1466744"])
@decorators.services_required("sahara")
class TestSaharaImageRegistry(helpers.TestCase):
@ -32,6 +30,7 @@ class TestSaharaImageRegistry(helpers.TestCase):
image_reg_pg = self.home_pg.go_to_dataprocessing_imageregistrypage()
image_reg_pg.register_image(IMAGE_NAME, self.CONFIG.scenario.ssh_user,
"Test description")
image_reg_pg.wait_until_image_registered(IMAGE_NAME)
self.assertTrue(image_reg_pg.is_image_registered(IMAGE_NAME),
"Image was not registered.")
self.assertFalse(image_reg_pg.is_error_message_present(),