forked from red-hat-data-services/ods-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Custom Serving Runtime UI test suite (red-hat-data-services#964)
* make open settings kw generic pt1 Signed-off-by: bdattoma <[email protected]> * add custom serving runtime suite Signed-off-by: bdattoma <[email protected]> * apply changes to Open dashboard settings kw calls Signed-off-by: bdattoma <[email protected]> * add basic keyword to upload a runtime template Signed-off-by: bdattoma <[email protected]> * add ods-2276 Signed-off-by: bdattoma <[email protected]> * add ovms-custom template Signed-off-by: bdattoma <[email protected]> * add click action common kw Signed-off-by: bdattoma <[email protected]> * add serving runtime deletion kw Signed-off-by: bdattoma <[email protected]> * add ods-2279 Signed-off-by: bdattoma <[email protected]> * check if details page is already open Signed-off-by: bdattoma <[email protected]> * make model server kw working on DSProject page Signed-off-by: bdattoma <[email protected]> * add ODS-2281 and final suite setup Signed-off-by: bdattoma <[email protected]> * add kw to delete single dsproject from cli Signed-off-by: bdattoma <[email protected]> * final suite setup/teardown Signed-off-by: bdattoma <[email protected]> * move runtime deletion to suite teardown Signed-off-by: bdattoma <[email protected]> * remove continue keyword Signed-off-by: bdattoma <[email protected]> * remove wrong arg from call Signed-off-by: bdattoma <[email protected]> * fix setup and teardown Signed-off-by: bdattoma <[email protected]> * fix eventual runtime creation Signed-off-by: bdattoma <[email protected]> * fix open section options menu Signed-off-by: bdattoma <[email protected]> * fix runtime deletion from cli Signed-off-by: bdattoma <[email protected]> * fix dryrun Signed-off-by: bdattoma <[email protected]> * fix dryrun (2) Signed-off-by: bdattoma <[email protected]> * fix dryrun (3) Signed-off-by: bdattoma <[email protected]> * increase pod timeout for runtime Signed-off-by: bdattoma <[email protected]> --------- Signed-off-by: bdattoma <[email protected]>
- Loading branch information
Showing
12 changed files
with
297 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: serving.kserve.io/v1alpha1 | ||
kind: ServingRuntime | ||
metadata: | ||
annotations: | ||
opendatahub.io/disable-gpu: "true" | ||
openshift.io/display-name: ODS-CI Custom OpenVINO Model Server | ||
labels: | ||
opendatahub.io/dashboard: "true" | ||
name: ovms-ods-ci | ||
spec: | ||
builtInAdapter: | ||
memBufferBytes: 134217728 | ||
modelLoadingTimeoutMillis: 90000 | ||
runtimeManagementPort: 8888 | ||
serverType: ovms | ||
containers: | ||
- args: | ||
- --port=8001 | ||
- --rest_port=8888 | ||
- --config_path=/models/model_config_list.json | ||
- --file_system_poll_wait_seconds=0 | ||
- --grpc_bind_address=127.0.0.1 | ||
- --rest_bind_address=127.0.0.1 | ||
image: quay.io/opendatahub/openvino_model_server:2022.3-release | ||
name: ovms | ||
grpcDataEndpoint: port:8001 | ||
grpcEndpoint: port:8085 | ||
multiModel: true | ||
protocolVersions: | ||
- grpc-v1 | ||
replicas: 1 | ||
supportedModelFormats: | ||
- autoSelect: true | ||
name: openvino_ir | ||
version: opset1 | ||
- autoSelect: true | ||
name: onnx | ||
version: "1" | ||
- autoSelect: true | ||
name: tensorflow | ||
version: "2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboardSettingsRuntimes.resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
*** Settings *** | ||
Documentation Collection of keywords to interact with Serving runtimes page | ||
Resource ../../../Common.robot | ||
|
||
|
||
*** Variables *** | ||
${ADD_RUNTIME_BTN_XP}= //button[text()="Add serving runtime"] | ||
${SUBMIT_RUNTIME_BTN_XP}= //button[text()="Add"] | ||
${UPLOAD_RUNTIME_BTN_XP}= //button[text()="Upload files"] | ||
${SCRATCH_RUNTIME_BTN_XP}= //button[text()="Start from scratch"] | ||
${EDITOR_RUNTIME_BTN_XP}= //div[contains(@class, "odh-dashboard__code-editor")] | ||
|
||
|
||
*** Keywords *** | ||
Click Add Serving Runtime Template Button | ||
SeleniumLibrary.Wait Until Page Contains Element ${ADD_RUNTIME_BTN_XP} | ||
SeleniumLibrary.Click Element ${ADD_RUNTIME_BTN_XP} | ||
Run Keyword And Continue On Failure SeleniumLibrary.Page Should Contain Add a serving runtime | ||
Run Keyword And Continue On Failure SeleniumLibrary.Page Should Contain Drag a file here, upload files, or start from scratch. | ||
Run Keyword And Continue On Failure SeleniumLibrary.Page Should Contain Element ${UPLOAD_RUNTIME_BTN_XP} | ||
Run Keyword And Continue On Failure SeleniumLibrary.Page Should Contain Element ${SCRATCH_RUNTIME_BTN_XP} | ||
Run Keyword And Continue On Failure SeleniumLibrary.Page Should Contain Element ${EDITOR_RUNTIME_BTN_XP} | ||
|
||
Upload Serving Runtime Template | ||
[Documentation] Uploads via UI a YAML file containing a custom Serving Runtime definition | ||
[Arguments] ${runtime_filepath} | ||
Click Add Serving Runtime Template Button | ||
SeleniumLibrary.Click Element ${UPLOAD_RUNTIME_BTN_XP} | ||
${rc} ${pwd}= Run And Return Rc And Output echo $PWD | ||
Should Be Equal As Integers ${rc} ${0} | ||
SeleniumLibrary.Choose File ${EDITOR_RUNTIME_BTN_XP}//input[@type="file"] ${pwd}/${runtime_filepath} | ||
Run Keyword And Continue On Failure SeleniumLibrary.Wait Until Page Contains Element //span[text()="kind"] | ||
Run Keyword And Continue On Failure SeleniumLibrary.Wait Until Page Contains Element //span[text()="ServingRuntime"] | ||
Submit Serving Runtime Template | ||
|
||
Submit Serving Runtime Template | ||
SeleniumLibrary.Click Element ${SUBMIT_RUNTIME_BTN_XP} | ||
Wait For RHODS Dashboard To Load expected_page=Serving runtimes | ||
... wait_for_cards=${FALSE} | ||
|
||
Serving Runtime Template Should Be Listed | ||
[Arguments] ${displayed_name} | ||
Run Keyword And Continue On Failure | ||
... SeleniumLibrary.Wait Until Page Contains Element | ||
... //table//tr/td[@data-label="Name"]//div[text()="${displayed_name}"] | ||
... timeout=10s | ||
|
||
Delete Serving Runtime Template | ||
[Arguments] ${displayed_name} ${press_cancel}=${FALSE} | ||
ODHDashboard.Click Action From Actions Menu item_title=${displayed_name} | ||
... action=Delete | ||
Handle Deletion Confirmation Modal item_title=${displayed_name} item_type=serving runtime press_cancel=${press_cancel} | ||
|
||
Delete Serving Runtime Template From CLI | ||
[Arguments] ${displayed_name} | ||
${resource_name}= Get OpenShift Template Resource Name By Displayed Name | ||
... displayed_name=${displayed_name} | ||
IF "${resource_name}" == "${EMPTY}" | ||
Log No Templates corresponding to ${displayed_name} Runtime. | ||
ELSE | ||
Oc Delete kind=Template name=${resource_name} namespace=${APPLICATIONS_NAMESPACE} | ||
END | ||
|
||
Get OpenShift Template Resource Name By Displayed Name | ||
[Arguments] ${displayed_name} | ||
${rc} ${resource_name}= Run And Return Rc And Output | ||
... oc get templates -ojson -n redhat-ods-applications | jq '.items[] | select(.objects[].metadata.annotations."openshift.io/display-name"=="${displayed_name}") | .metadata.name' | tr -d '"' | ||
Should Be Equal As Integers ${rc} ${0} | ||
RETURN ${resource_name} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.