Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SMMR clean up from KServe test teardown #1082

Merged
merged 5 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -271,20 +271,25 @@
... oc patch smmr/default -n ${servicemesh_ns} --type='json' -p="[{'op': 'add', 'path': '/spec/members/-', 'value': \"${namespace}\"}]"
Should Be Equal As Integers ${rc} ${0}

Remove Namespace From ServiceMeshMemberRoll
Namespace Should Be Removed From ServiceMeshMemberRoll
Fixed Show fixed Hide fixed
[Documentation] Checks if the given namespace is present in the SMMR.
... If yes, it fails
[Arguments] ${namespace} ${servicemesh_ns}=istio-system
${rc} ${ns_idx}= Run And Return Rc And Output
... oc get smmr/default -n ${servicemesh_ns} -o json | jq '.spec.members | map(. == "${namespace}") | index(true)'
${rc} ${member_list}= Run And Return Rc And Output
... oc get smmr/default -n ${servicemesh_ns} -o json | jq '.spec.members'
Should Be Equal As Integers ${rc} ${0}
IF "${ns_idx}" == "null"
Log message=${namespace} was not in the SMMR..
... level=WARN
IF $member_list == "null"
Log message=ServiceMeshMemberRoll already cleaned up
ELSE
${rc} ${out}= Run And Return Rc And Output oc patch smmr/default -n ${servicemesh_ns} --type='json' -p="[{'op': 'remove', 'path': '/spec/members/${ns_idx}'}]"
${rc} ${ns_idx}= Run And Return Rc And Output
... oc get smmr/default -n ${servicemesh_ns} -o json | jq '.spec.members | map(. == "${namespace}") | index(true)' # robocop: disable
Should Be Equal As Integers ${rc} ${0}
Should Be Equal As Strings ${ns_idx} null
... msg=${namespace} should have been automatically removed from SMMR
END


Deploy Model Via CLI

Check warning

Code scanning / Robocop

Invalid number of empty lines between keywords ({{ empty_lines }}/{{ allowed_empty_lines }}) Warning test

Invalid number of empty lines between keywords (2/1)
[Documentation] Deploys a model using Model Serving feature by applying the InfereceService
... yaml via CLI. It assumes that the necessary Runtime has been already created
... in the same ${namespace}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,15 +590,8 @@ Clean Up Test Project
ELSE
Log To Console InferenceService Delete option not provided by user
END
${rc} ${member_list}= Run And Return Rc And Output
... oc get smmr/default -n ${SERVICEMESH_CR_NS} -o json | jq '.spec.members'
Should Be Equal As Integers ${rc} ${0}
IF "${member_list}" == "null"
Log message=ServiceMeshMemberRoll already cleaned up. Skipping manual deletion
ELSE
Remove Namespace From ServiceMeshMemberRoll namespace=${test_ns}
... servicemesh_ns=${SERVICEMESH_CR_NS}
END
Wait Until Keyword Succeeds 10 1s Namespace Should Be Removed From ServiceMeshMemberRoll
... namespace=${test_ns}
${rc} ${out}= Run And Return Rc And Output oc delete project ${test_ns}
Should Be Equal As Integers ${rc} ${0}
${rc} ${out}= Run And Return Rc And Output oc wait --for=delete namespace ${test_ns} --timeout=300s
Expand Down
Loading