red-hat-storage / ocs-ci

https://ocs-ci.readthedocs.io/en/latest/
MIT License
109 stars 166 forks source link

Test test_obc_creation_and_deletion fails to find bucket. Investigate why so many buckets created. #7486

Closed DanielOsypenko closed 1 year ago

DanielOsypenko commented 1 year ago

Test fails with stuck trace =>

  ObUI(setup_ui_class).delete_object_bucket_ui(
        delete_via="three_dots", expect_fail=True, resource_name=obc_name
    )

tests/manage/mcg/ui/test_mcg_ui.py:325:

ocs_ci/ocs/ui/mcg_ui.py:422: in delete_object_bucket_ui self.delete_resource(delete_via, resource_name) ocs_ci/ocs/ui/mcg_ui.py:301: in delete_resource self.do_click( ocs_ci/ocs/ui/base_ui.py:134: in do_click _do_click(locator, timeout, enable_screenshot, copy_dom)

_locator = ("//td[@id='name']//a[contains(text(), 'obc-ui-42ac664a21a947a4aea201e459f65e77')]/../../..//button[@aria-label='Actions']", 'xpath') _timeout = 30, _enable_screenshot = False, _copy_dom = False

def _do_click(_locator, _timeout=30, _enable_screenshot=False, _copy_dom=False): self.page_has_loaded() screenshot = ( ocsci_config.UI_SELENIUM.get("screenshot") and enable_screenshot ) if screenshot: self.take_screenshot() if _copy_dom: self.copy_dom()

wait = WebDriverWait(self.driver, timeout)
try:
    if (
        version.get_semantic_version(get_ocp_version(), True)
        <= version.VERSION_4_11
    ):
        element = wait.until(
            ec.element_to_be_clickable((locator[1], locator[0]))
        )
    else:
        element = wait.until(
            ec.visibility_of_element_located((locator[1], locator[0]))
        )
    element.click()
except TimeoutException as e:
    self.take_screenshot()
    self.copy_dom()
    logger.error(e)

  raise TimeoutException(
        f"Failed to find the element ({locator[1]},{locator[0]})"
    )

E selenium.common.exceptions.TimeoutException: Message: Failed to find the element (xpath,//td[@id='name']//a[contains(text(), 'obc-ui-42ac664a21a947a4aea201e459f65e77')]/../../..//button[@aria-label='Actions'])

=================

image

=================

https://reportportal-ocs4.apps.ocp-c1.prod.psi.redhat.com/ui/#ocs/launches/462/10316/456696/456840/456842/log

DanielOsypenko commented 1 year ago

found that ocs_ci/ocs/scale_noobaa_lib.py::construct_obc_creation_yaml_bulk_for_kube_job might create them as create_unique_resource_name("test", "obc") call matches the name of the obc's