Skip to content

Commit

Permalink
update 2.13
Browse files Browse the repository at this point in the history
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
  • Loading branch information
rnetser committed Oct 1, 2024
1 parent 846f459 commit 78fe13f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 42 deletions.
9 changes: 4 additions & 5 deletions ods_ci/tests/Resources/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,11 @@ Extract URLs From Text
RETURN ${urls}

Run And Verify Command
[Documentation] Run and verify shell command
[Arguments] ${command} ${print_to_log}=${TRUE}
${result}= Run Process ${command} shell=yes stderr=STDOUT
IF ${print_to_log} Log ${result.stdout} console=True
[Documentation] Run an oc delete command and log the output and errors
[Arguments] ${command}
${result}= Run Process ${command} shell=yes
Log ${result.stdout}\n${result.stderr} console=True
Should Be True ${result.rc} == 0
RETURN ${result.stdout}

Run And Watch Command
[Documentation] Run any shell command (including args) with optional:
Expand Down
10 changes: 0 additions & 10 deletions ods_ci/tests/Resources/OCP.resource
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,6 @@ Wait For Pods To Be Ready
Length Should Be ${replicas} ${exp_replicas}
END

Wait For Deployment Replica To Be Ready
[Documentation] Wait for Deployment of ${label_selector} in ${namespace} to have the Replica-Set Ready
[Arguments] ${namespace} ${label_selector} ${timeout}=600s
Log To Console Waiting for Deployment with label "${label_selector}" in Namespace "${namespace}", to have desired Replica-Set
${output} = Wait Until Keyword Succeeds ${timeout} 3s Run And Verify Command
... oc wait -n ${namespace} --for condition\=ready pod -l "${label_selector}" --timeout\=${timeout}
... print_to_log=${FALSE}
Run And Verify Command
... oc get deployment -l ${label_selector} -n ${namespace} -o json | jq -e '.status | .replicas \=\= .readyReplicas'

Wait For Pods To Succeed
[Arguments] ${label_selector} ${namespace} ${timeout}=300s ${exp_replicas}=${NONE}
Wait Until Keyword Succeeds ${timeout} 3s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Create Model Server
Set Replicas Number With Buttons
[Documentation] Sets the number of replicas for the model serving pod
[Arguments] ${number}
${current}= Get Element Attribute css:[id="model-server-replicas"] value
${current}= Get Element Attribute ${REPLICAS_COUNT_XP} value
${difference}= Evaluate int(${number})-int(${current})
${op}= Set Variable plus
IF ${difference}<${0}
Expand All @@ -94,7 +94,7 @@ Set Replicas Number With Buttons
Click Minus Button
END
END
${current}= Get Element Attribute css:[id="model-server-replicas"] value
${current}= Get Element Attribute ${REPLICAS_COUNT_XP} value
Should Be Equal As Integers ${current} ${number}

Set Server Size
Expand Down Expand Up @@ -223,15 +223,14 @@ Get Model Serving Access Token via UI
... ${model_name}=${NONE} ${multi_model_servers}=${FALSE}
IF ${single_model}
# Expand the model
#SeleniumLibrary.Click Button xpath://a[text()='${model_name}']/parent::div/parent::td[@data-label='Name']/preceding-sibling::td/button # robocop: off=line-too-long
SeleniumLibrary.Click Element xpath://a[text()='${model_name}']/../../../../td/button[@class="pf-v5-c-button pf-m-plain pf-m-expanded"]
SeleniumLibrary.Click Button xpath: //a[text()='${model_name}']/parent::div/parent::td[@data-label='Name']/preceding-sibling::td/button # robocop: off=line-too-long
${token}= Get Single Model Token ${service_account_name}
ELSE
SeleniumLibrary.Wait Until Page Contains Element xpath://td[@data-label="Tokens"]/button
# TODO: ModelMesh requires passing model server name and not model name;
# TODO: ModelMesh requires passing model server name and not model name;
# in particular when there are multiple model servers
# in the same project.
# This is a temporary workaround until the issue is fixed.
# This is a temporary workaround until the issue is fixed.
# With one model server, the model name is not required.
IF ${multi_model_servers}
SeleniumLibrary.Click Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,18 +373,11 @@ Clean Up Model Serving Page
[Documentation] Deletes all currently deployed models, if any are present.
# Returns an empty list if no matching elements found
Switch Model Serving Project project_name=All projects
${projects}= Get WebElements xpath://table/tbody/tr/td[@data-label="Project"]
FOR ${project} IN @{projects}
${project}= Get Text ${project}
@{project description}= Split String ${project}
Switch Model Serving Project ${project description}[0]
${models}= Get WebElements xpath://table/tbody/tr/td[@data-label="Name"]/div/a
FOR ${model} IN @{models}
${model}= Get Text ${model}
Delete Model Via UI ${model}
Sleep 1s
END
Switch Model Serving Project project_name=All projects
${models}= Get WebElements xpath://table/tbody/tr/td[@data-label="Name"]/div/a
FOR ${model} IN @{models}
${model}= Get Text ${model}
Delete Model Via UI ${model}
Sleep 1s
END

Add Namespace To ServiceMeshMemberRoll
Expand Down Expand Up @@ -473,9 +466,7 @@ Set Model Server Runtime
[Arguments] ${runtime}=Caikit TGIS
Page Should Contain Element ${KSERVE_RUNTIME_DROPDOWN}
Click Element ${KSERVE_RUNTIME_DROPDOWN}
${runtime_element} Set Variable ${KSERVE_RUNTIME_DROPDOWN}/..//span[contains(text(),"${runtime}")]
Page Should Contain Element ${runtime_element}
Click Element ${runtime_element}
Click Element ${KSERVE_RUNTIME_DROPDOWN}/..//span[contains(text(),"${runtime}")]

Get Kserve Inference Host Via UI
[Documentation] Fetches the host of the model's URL from the Data Science Project UI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Cross Auth Test Setup
Launch Dashboard ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
... ${ODH_DASHBOARD_URL} ${BROWSER.NAME} ${BROWSER.OPTIONS}
Fetch Knative CA Certificate filename=openshift_ca_istio_knative.crt
# Clean All Models Of Current User
Clean All Models Of Current User

Cross Auth Test Teardown
[Documentation] Test teardown steps after testing DSG. It Deletes
Expand All @@ -129,11 +129,11 @@ Cross Auth Test Teardown

# Even if kw fails, deleting the whole project will also delete the model
# Failure will be shown in the logs of the run nonetheless
# IF ${MODEL_CREATED}
# Clean All Models Of Current User
# ELSE
# Log Model not deployed, skipping deletion step during teardown console=true
# END
IF ${MODEL_CREATED}
Clean All Models Of Current User
ELSE
Log Model not deployed, skipping deletion step during teardown console=true
END
${projects}= Create List ${project_name}
Delete List Of Projects Via CLI ocp_projects=${projects}
# Will only be present on SM cluster runs, but keyword passes
Expand Down

0 comments on commit 78fe13f

Please sign in to comment.