-
Notifications
You must be signed in to change notification settings - Fork 81
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
RHOAIENG-2508 ODS-2600 Validate DSC creates all Serverless CRs #1259
Changes from 18 commits
e15eb4d
132594f
bd5184c
af7b4d8
de5d3e9
8c813bb
46b2b76
8b1f734
e0fc0be
edafa97
9c34b0d
b46accf
ae0d917
43f0a2d
53e9465
e68dd21
a699a90
35c9761
1c68c23
4261ec6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
*** Settings *** | ||
Documentation Test Cases to verify Serverless installation | ||
Library Collections | ||
Library SeleniumLibrary | ||
Library OpenShiftLibrary | ||
Resource ../../../../Resources/Page/OCPDashboard/OCPDashboard.resource | ||
Resource ../../../../Resources/OCP.resource | ||
Suite Setup Suite Setup | ||
Suite Teardown Suite Teardown | ||
|
||
|
||
*** Variables *** | ||
${KNATIVESERVING_NS} knative-serving | ||
${ISTIO_NS} istio-system | ||
${regex_pattern} ERROR | ||
|
||
${LABEL_SELECTOR} name=rhods-operator | ||
|
||
Check warning Code scanning / Robocop Invalid number of empty lines between sections ({{ empty_lines }}/{{ allowed_empty_lines }}) Warning test
Invalid number of empty lines between sections (1/2)
|
||
*** Test Cases *** | ||
Validate DSC creates all Serverless CRs | ||
Check warning Code scanning / Robocop Test case '{{ test_name }}' has too many keywords inside ({{ keyword_count }}/{{ max_allowed_count }}) Warning test
Test case 'Validate DSC creates all Serverless CRs' has too many keywords inside (12/10)
|
||
[Documentation] The purpose of this Test Case is to validate the creation | ||
... of Serverless Custom Resources | ||
... ProductBug: RHOAIENG-4358 | ||
[Tags] Operator ODS-2600 ProductBug | ||
Assign Vars According To Product ${PRODUCT} | ||
Resource Should Exist KnativeServing knative-serving ${KNATIVESERVING_NS} | ||
Resource Status Should Be oc get KnativeServing knative-serving -n ${KNATIVESERVING_NS} -o json | jq '.status.conditions[] | select(.type=="Ready") | .status' KnativeServing "True" # robocop: disable | ||
Resource Should Exist Gateway knative-ingress-gateway ${KNATIVESERVING_NS} | ||
Resource Should Exist Gateway knative-local-gateway ${KNATIVESERVING_NS} | ||
Resource Should Exist Service knative-local-gateway ${ISTIO_NS} | ||
Resource Should Exist deployment controller ${KNATIVESERVING_NS} | ||
Wait For Pods Numbers 2 namespace=${KNATIVESERVING_NS} | ||
... label_selector=app.kubernetes.io/component=controller timeout=120 | ||
${pod_names}= Get Pod Names ${KNATIVESERVING_NS} app.kubernetes.io/component=controller | ||
Verify Containers Have Zero Restarts ${pod_names} ${KNATIVESERVING_NS} | ||
${podname}= Get Pod Name ${OPERATOR_NAMESPACE} ${LABEL_SELECTOR} | ||
Verify Pod Logs Do Not Contain ${podname} ${OPERATOR_NAMESPACE} ${regex_pattern} rhods-operator | ||
Read DSC Conditions ${KNATIVESERVING_NS} default-dsc | ||
|
||
|
||
*** Keywords *** | ||
Suite Setup | ||
[Documentation] Suite Setup | ||
Set Library Search Order SeleniumLibrary | ||
RHOSi Setup | ||
|
||
Suite Teardown | ||
[Documentation] Suite Teardown | ||
Close All Browsers | ||
RHOSi Teardown | ||
|
||
Assign Vars According To Product | ||
jgarciao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[Documentation] Assign vars related to product | ||
[Arguments] ${PRODUCT} | ||
IF "${PRODUCT}" == "RHODS" | ||
Set Suite Variable ${OPERATOR_APPNAME} Red Hat OpenShift AI | ||
Check notice Code scanning / Robocop {{ set_variable_keyword }} can be replaced with VAR Note test
Set Suite Variable can be replaced with VAR
|
||
Set Suite Variable ${OPERATOR_NAME} Red Hat OpenShift AI | ||
|
||
ELSE IF "${PRODUCT}" == "ODH" | ||
Set Suite Variable ${OPERATOR_APPNAME} Open Data Hub Operator | ||
Check notice Code scanning / Robocop {{ set_variable_keyword }} can be replaced with VAR Note test
Set Suite Variable can be replaced with VAR
|
||
Set Suite Variable ${OPERATOR_NAME} Open Data Hub Operator | ||
|
||
END | ||
|
||
Read DSC Conditions | ||
[Documentation] Reads all DSC conditions | ||
[Arguments] ${namespace} ${dsc_name} | ||
${rc} ${out}= Run And Return Rc And Output | ||
... oc get DataScienceCluster ${dsc_name} -n ${namespace} -o jsonpath='{.status.conditions[].reason}' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How exactly we check the condition here? 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is meant to be displayed as it is very prone to errors depending on the installation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, the status of the components isn't stable... this is something I think that operator could also improve... the statuses are regularly changing even in case that all is fine (Ready vs Unknown). Again, I am new to the OpenShift world, so my assumption can be wrong. But wanted to say that this doesn't check anything... it just prints some info... so if that is desired and won't be changed, please rename the keyword appropriately so it's not confusing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. changed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just realized that we are checking the condition of just one component - then... shouldn't we want it to be in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. changed the keyword to wait for Conditions on DSC to be Reconciled successfully or timeout |
||
Should Be Equal As Integers ${rc} ${0} | ||
Log ${out} console=${out} |
Check warning
Code scanning / Robocop
Keyword name '{{ keyword_name }}' does not follow case convention Warning test