Skip to content

Commit

Permalink
[Fix] test that checks that Notebook resource has expected size
Browse files Browse the repository at this point in the history
* fix to the xpath to proper extract the expected resource requests and
  limits
* excluded size Medium from the test as it won't start on our regular
  cluster size due to the Memory limit (24GB)
* commented out currently unused code and added some comments
  • Loading branch information
jstourac committed Oct 10, 2024
1 parent 61dfaf4 commit 0fe58eb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ Get Container Size
... timeout=30 error=Container size selector is not present in KFNBC Spawner
Click Element xpath:${KFNBC_CONTAINER_SIZE_DROPDOWN_XPATH}
Wait Until Page Contains Element xpath://span[.="${container_size}"]/../.. timeout=10
${data} Get Text xpath://span[.="${container_size}"]/../span[2]
${data} Get Text xpath://li[@data-testid="${container_size}"]//span[contains(text(), "Limits")]
${l_data} Convert To Lower Case ${data}
${data} Get Formated Container Size To Dictionary ${l_data}
RETURN ${data}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ Test Tags JupyterHub

*** Variables ***
${NAMESPACE} ${NOTEBOOKS_NAMESPACE}
@{NOTEBOOK_SIZE} Small Medium
# Anything above Small requires more memory than our standard testsing cluster can provide.
# TODO: We shall come up with some solution in the future.
@{NOTEBOOK_SIZE} Small # Medium Large X Large
${DEFAULT_SIZE} {"limits":{"cpu":"2","memory":"8gi"},"requests":{"cpu":"1","memory":"8gi"}}
${CUSTOME_SIZE} {"limits":{"cpu":"6","memory":"9gi"},"requests":{"cpu":"2","memory":"6gi"}}

Expand All @@ -34,13 +36,14 @@ Verify Spawned Notebook Size
[Documentation] Check the available container size spec
... with actual assign to spawned notebook pod
[Tags] Tier2
... Execution-Time-Over-15m
... FlakyTest
... ODS-1072
# ... Execution-Time-Over-15m
# ... FlakyTest
Launch JupyterHub Spawner From Dashboard
Spawn Notebook And Verify Size

# I think this TC is not valid anymore
# TODO: this custom could be a workaround to test different than default values due to the cluster size.
# Verify Custom Spwaned Notebook Size
# [Documentation] Modify and verify the default notebook conatiner size spec
# ... with spwaned notebook pod and set back to default size
Expand Down Expand Up @@ -87,12 +90,12 @@ Spawn Notebook And Verify Size
Fix Spawner Status
END

Modify Default Container Size
[Documentation] Modify the default container size using oc command
${output} Run Process sh ${CURDIR}/odh_jh_global_profile.sh modify shell=yes
Should Not Contain ${output.stdout} FAIL
# Modify Default Container Size
# [Documentation] Modify the default container size using oc command
# ${output} Run Process sh ${CURDIR}/odh_jh_global_profile.sh modify shell=yes
# Should Not Contain ${output.stdout} FAIL

Restore Default Container Size
[Documentation] Restore default container size using oc command
${output} Run Process sh ${CURDIR}/odh_jh_global_profile.sh default shell=yes
Should Not Contain ${output.stdout} FAIL
# Restore Default Container Size
# [Documentation] Restore default container size using oc command
# ${output} Run Process sh ${CURDIR}/odh_jh_global_profile.sh default shell=yes
# Should Not Contain ${output.stdout} FAIL

0 comments on commit 0fe58eb

Please sign in to comment.