Skip to content

Commit

Permalink
Fix: GPU related tests (#1413)
Browse files Browse the repository at this point in the history
* fix: DS Projects permission mgmt tests

* fix: ODS-2013

* fix: ODS-2014

* fix: ODS-2024

* fix: Accelerator buttons and CUDA version
  • Loading branch information
FedeAlonso authored Apr 30, 2024
1 parent d905c6f commit aae86d2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ ${KFNBC_CONTAINER_SIZE_DROPDOWN_XPATH} = //label[@for="modal-notebook-container
${KFNBC_ACCELERATOR_HEADER_XPATH} = //span[text()='Accelerator']
${KFNBC_ACCELERATOR_DROPDOWN_XPATH} = //label[@for='modal-notebook-accelerator']/ancestor::div[@class='pf-v5-c-form__group']/descendant::button
${KFNBC_ACCELERATOR_INPUT_XPATH} = //input[@aria-label='Number of accelerators']
${KFNBC_ACCELERATOR_LESS_BUTTON_XPATH} = ${KFNBC_ACCELERATOR_INPUT_XPATH}/preceding-sibling::button
${KFNBC_ACCELERATOR_PLUS_BUTTON_XPATH} = ${KFNBC_ACCELERATOR_INPUT_XPATH}/following-sibling::button
${KFNBC_MAX_ACCELERATOR_WARNING_XPATH} = //div[@aria-label='Warning Alert']//h4[contains(text(), 'accelerator detected')]
${KFNBC_ACCELERATOR_LESS_BUTTON_XPATH} = ${KFNBC_ACCELERATOR_INPUT_XPATH}/parent::*/parent::*/preceding-sibling::*//button
${KFNBC_ACCELERATOR_PLUS_BUTTON_XPATH} = ${KFNBC_ACCELERATOR_INPUT_XPATH}/parent::*/parent::*/following-sibling::*//button
${KFNBC_MAX_ACCELERATOR_WARNING_XPATH} = //div[contains(@class, 'pf-m-warning')]//h4[contains(text(), 'accelerator detected')]
${KFNBC_MODAL_HEADER_XPATH} = //div[@aria-label="Starting server modal"]
${KFNBC_MODAL_CANCEL_XPATH} = ${KFNBC_MODAL_HEADER_XPATH}//button[.="Cancel"]
${KFNBC_MODAL_CLOSE_XPATH} = ${KFNBC_MODAL_HEADER_XPATH}//button[.="Close"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ Verify Displayed GPU Count
IF ${expanded}==False
Click Element xpath://button[@aria-expanded="false"]/span[.="${server_name}"]
END
Click Element ${SERVING_MODEL_SERVERS_SIDE_MENU}
Sleep 5s reason=Sometimes the number of current Accelerators take a few seconds to update
${current_accs}= Get Text xpath://span[text()="${server_name}"]/../../../following-sibling::tr//td[@data-label]/div/dl/div[4]/dd/div
Should Match ${current_accs} ${no_gpus}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ${WORKBENCH_IMAGE_MENU_BTN_XP}= xpath=//*[@data-testid="workbench-imag
${WORKBENCH_IMAGE_ITEM_BTN_XP}= xpath=//div[@id="workbench-image-stream-selection"]//li//div
${WORKBENCH_SIZE_MENU_BTN_XP}= xpath=//section[@id="deployment-size"]//button # Removing the attribute in case it changes like it did for the image dropdown
${WORKBENCH_SIZE_SIDE_MENU_BTN}= xpath=//nav[@aria-label="Jump to section"]//span[text()="Deployment size"]
${WORKBENCH_ACCELERATOR_DROPDOWN_XPATH}= xpath=//label[@for='modal-notebook-accelerator']/ancestor::div[@class='pf-c-form__group']/descendant::button
${WORKBENCH_ACCELERATOR_DROPDOWN_XPATH}= xpath=//label[@for='modal-notebook-accelerator']/ancestor::div[ contains(@class, '-form__group')]/descendant::button
${WORKBENCH_ACCELERATOR_INPUT_XPATH}= xpath=//input[@aria-label='Number of accelerators']
${WORKBENCH_ACCELERATOR_LESS_BUTTON_XPATH}= xpath=${WORKBENCH_ACCELERATOR_INPUT_XPATH}/preceding-sibling::button
${WORKBENCH_ACCELERATOR_PLUS_BUTTON_XPATH}= xpath=${WORKBENCH_ACCELERATOR_INPUT_XPATH}/following-sibling::button
Expand Down Expand Up @@ -517,7 +517,7 @@ Select Workbench Number Of GPUs
Wait Until Page Contains Element ${WORKBENCH_ACCELERATOR_DROPDOWN_XPATH}
Click Element ${WORKBENCH_ACCELERATOR_DROPDOWN_XPATH}
IF "${gpus}" == "0"
Click Element xpath=//a[text()='None']
Click Element xpath=//span[text()='None']
ELSE
# Select Accelerator Technology
Wait Until Page Contains Element xpath=//div[@class and text()=${gpu_type}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ Verify User Can Add GPUs To Workbench
... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE_GPU} deployment_size=Small
... storage=Persistent pv_existent=${FALSE} pv_name=${PV_NAME_GPU}
... pv_description=${EMPTY} pv_size=${PV_SIZE}
Run Keyword And Continue On Failure Wait Until Workbench Is Started workbench_title=${WORKBENCH_TITLE_GPU}
Run Keyword And Continue On Failure
... Wait Until Workbench Is Started workbench_title=${WORKBENCH_TITLE_GPU} timeout=180s
Edit GPU Number workbench_title=${WORKBENCH_TITLE_GPU} gpus=1
Wait Until Project Is Open project_title=${PRJ_TITLE}
Run Keyword And Continue On Failure Wait Until Workbench Is Restarting workbench_title=${WORKBENCH_TITLE_GPU}
Expand Down
2 changes: 1 addition & 1 deletion ods_ci/tests/Tests/500__jupyterhub/minimal-cuda-test.robot
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Test Tags JupyterHub

*** Variables ***
${NOTEBOOK_IMAGE} = minimal-gpu
${EXPECTED_CUDA_VERSION} = 12.2
${EXPECTED_CUDA_VERSION} = 12.4


*** Test Cases ***
Expand Down

0 comments on commit aae86d2

Please sign in to comment.