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:
parent
4ae89d4c24
commit
86d2d4a11b
@ -76,3 +76,6 @@ class ImageregistryPage(basepage.BaseNavigationPage):
|
|||||||
self.register_form.user_name.text = user_name
|
self.register_form.user_name.text = user_name
|
||||||
self.register_form.description.text = description
|
self.register_form.description.text = description
|
||||||
self.register_form.submit.click()
|
self.register_form.submit.click()
|
||||||
|
|
||||||
|
def wait_until_image_registered(self, name):
|
||||||
|
self._wait_until(lambda x: self.is_image_registered(name))
|
||||||
|
@ -16,8 +16,6 @@ from openstack_dashboard.test.integration_tests.tests import decorators
|
|||||||
IMAGE_NAME = helpers.gen_random_resource_name("image")
|
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")
|
@decorators.services_required("sahara")
|
||||||
class TestSaharaImageRegistry(helpers.TestCase):
|
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 = self.home_pg.go_to_dataprocessing_imageregistrypage()
|
||||||
image_reg_pg.register_image(IMAGE_NAME, self.CONFIG.scenario.ssh_user,
|
image_reg_pg.register_image(IMAGE_NAME, self.CONFIG.scenario.ssh_user,
|
||||||
"Test description")
|
"Test description")
|
||||||
|
image_reg_pg.wait_until_image_registered(IMAGE_NAME)
|
||||||
self.assertTrue(image_reg_pg.is_image_registered(IMAGE_NAME),
|
self.assertTrue(image_reg_pg.is_image_registered(IMAGE_NAME),
|
||||||
"Image was not registered.")
|
"Image was not registered.")
|
||||||
self.assertFalse(image_reg_pg.is_error_message_present(),
|
self.assertFalse(image_reg_pg.is_error_message_present(),
|
||||||
|
Loading…
Reference in New Issue
Block a user