-
Notifications
You must be signed in to change notification settings - Fork 82
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
Automate Validate ServiceMeshControlPlaneAlreadyCreated Test Case #1762
Automate Validate ServiceMeshControlPlaneAlreadyCreated Test Case #1762
Conversation
@@ -199,7 +199,7 @@ | |||
Install RHODS In Self Managed Cluster Using CLI | |||
[Documentation] Install rhods on self managed cluster using cli | |||
[Arguments] ${cluster_type} ${image_url} | |||
${return_code} Run and Watch Command cd ${EXECDIR}/${OLM_DIR} && ./setup.sh -t operator -u ${UPDATE_CHANNEL} -i ${image_url} -n ${OPERATOR_NAME} -p ${OPERATOR_NAMESPACE} timeout=20 min | |||
${return_code} Run and Watch Command cd ${EXECDIR}/${OLM_DIR} && ./setup.sh -t operator -u ${UPDATE_CHANNEL} -i ${image_url} timeout=20 min |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning
${IS_PRESENT} 0 | ||
${IS_NOT_PRESENT} 1 | ||
${OLM_DIR} olm | ||
${INSTALL_TYPE} CLi |
Check notice
Code scanning / Robocop
Variable '{{ name }}' is assigned but not used Note test
${IS_NOT_PRESENT} 1 | ||
${OLM_DIR} olm | ||
${INSTALL_TYPE} CLi | ||
${TEST_ENV} PSI |
Check notice
Code scanning / Robocop
Variable '{{ name }}' is assigned but not used Note test
${TEST_ENV} PSI | ||
${IS_PRESENT} 0 | ||
${IS_NOT_PRESENT} 1 | ||
${MSSG_REGEX} denied the request: only one service mesh may be installed per project/namespace |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
${matches}= Get Regexp Matches ${OCP_CONSOLE_URL} rh-ods | ||
${domain}= Get From List ${matches} 0 | ||
IF "${domain}" == "rh-ods" | ||
Set Global Variable ${CLUSTER_TYPE} selfmanaged |
Check notice
Code scanning / Robocop
{{ set_variable_keyword }} can be replaced with VAR Note test
IF "${domain}" == "rh-ods" | ||
Set Global Variable ${CLUSTER_TYPE} selfmanaged | ||
ELSE | ||
Set Global Variable ${CLUSTER_TYPE} managed |
Check notice
Code scanning / Robocop
{{ set_variable_keyword }} can be replaced with VAR Note test
|
||
Delete Smcp | ||
[Documentation] Delete the ServiceMeshControlPlane already created | ||
Run and Watch Command |
Check warning
Code scanning / Robocop
Keyword name '{{ keyword_name }}' does not follow case convention Warning test
[Documentation] Loop until the Operator deployment is ready | ||
${rc}= Set Variable 1 | ||
TRY | ||
WHILE ${rc} != 0 limit=10m |
Check notice
Code scanning / Robocop
'{{ block_name }}' condition can be simplified Note test
|
||
Cleanup Olm Install Dir | ||
[Documentation] Clean up olm install repo | ||
${return_code}= Run and Watch Command rm -vRf ${EXECDIR}/${OLM_DIR} timeout=10 min |
Check warning
Code scanning / Robocop
Keyword name '{{ keyword_name }}' does not follow case convention Warning test
Robot Results
|
Running rhods-ci-pr-test/3305/ |
...ts/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0110__service_mesh.robot
Fixed
Show fixed
Hide fixed
Fetch Image Url And Update Channel | ||
[Documentation] Fetch url for image and Update Channel | ||
${rc} ${out}= Run And Return Rc And Output | ||
... oc get catalogsource rhoai-catalog-dev --namespace openshift-marketplace -o jsonpath='{.spec.image}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we test a catalog source that is not created by automations and the user includes manually another name, this line will fail.
Lets see if we can get a generic way to retrieve the used catalogsource, maybe by tags or by image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try with some label selector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added workaround to get CatalogSource from subscription
${rc} ${out}= Run And Return Rc And Output | ||
... oc get subscription rhoai-operator-dev --namespace redhat-ods-operator -o jsonpath='{.spec.channel}' | ||
Should Be Equal As Integers ${rc} 0 | ||
Set Global Variable ${UPDATE_CHANNEL} ${out} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same here, the subscription can have a different name if we dont use automations and we deploy the catalog source by hand
rhods-ci-pr-test/3306 passed successfully |
Delete Smcp | ||
# Cleanup Olminstall dir | ||
Cleanup Olm Install Dir | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a teardown method for the test just in case some step fails, so we are back to initial state, with ODH/RHOAI installed and working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Cesar, we need a teardown which restore the correct RHOAI status in the cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I can move it to the Suite Teardown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added Test Case Teardown
...ts/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0110__service_mesh.robot
Outdated
Show resolved
Hide resolved
|
||
Suite Teardown | ||
[Documentation] Suite Teardown | ||
RHOSi Teardown | ||
|
||
Teardown Service Mesh Control Plane Already Created |
Check warning
Code scanning / Robocop
Missing documentation in '{{ name }}' keyword Warning test
${rc} ${out}= Run And Return Rc And Output | ||
... oc get catalogsource rhoai-catalog-dev --namespace openshift-marketplace -o jsonpath='{.spec.image}' | ||
Should Be Equal As Integers ${rc} 0 | ||
Set Global Variable ${IMAGE_URL} ${out} |
Check notice
Code scanning / Robocop
{{ set_variable_keyword }} can be replaced with VAR Note test
Create DataScienceCluster CustomResource Using Custom Configuration | ||
Apply Custom Manifest in DataScienceCluster CustomResource Using Custom Configuration | ||
${yml} = Get File ${file_path}dsc_apply.yml | ||
Log To Console Applying DSC yaml | ||
Log To Console ${yml} | ||
${return_code} ${output} = Run And Return Rc And Output oc apply -f ${file_path}dsc_apply.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this applying multiple times the DSC? at line 282 (maybe in 283) and 287?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, the keyword says "Apply" but it doesn-t mean to actually Apply in the cluster via OC. Unless it's only me seeing the ambiguity, would you mind clear it a bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That part follows the same logic as before (just some common parts) it is not newly added logic. On these lines it is just getting the file to log it into console
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah but still, the ambiguity reading the code remains
@@ -335,6 +367,14 @@ Apply Custom Manifest in DataScienceCluster CustomResource Using Test Variables | |||
END | |||
END | |||
|
|||
Apply Custom Manifest in DataScienceCluster CustomResource Using Custom Configuration | |||
[Documentation] Apply custom manifests to a DSC file | |||
Log To Console Applying Custom Manifests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not applying actually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to applying devFlags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that wouldn't change much, it would still not being "applying" anything on the cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that if a keyword is just editing a local YAML file, without actually applying it with OC client. it'd better to make it clear in the kw name like "Generate DataScianceCluster YAML" which gather any edit you need. Or if you need/prefer single keywords, Generate CustomManifest in DSC YAML
or similar.
Then I'd expect to find a keyword which actually Applies the DSC resource in the cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed keyword to Generate CustomManifest in DSC YAML
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty, however the same applies to the other keywords in the PR which says "Apply" but doesn-t apply
...ts/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0110__service_mesh.robot
Outdated
Show resolved
Hide resolved
Log To Console Applying devFlags | ||
${file_path} = Set Variable tasks/Resources/Files/ | ||
FOR ${cmp} IN @{COMPONENT_LIST} | ||
Run sed -i'' -e "s|<${cmp}_devflags>||g" ${file_path}dsc_apply.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, is it actually removing the dev flags?
Also, isn't this the same action done at https://github.com/red-hat-data-services/ods-ci/pull/1762/files#diff-11c2f02f8419b8b4ee8bf5f117645cfe5da320a349f21813d8da399c47a7ffb3R369
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is setting the key as empty as it is by default
Quality Gate passedIssues Measures |
RHOAIENG-2517 Test Case to validate that only one Service Mesh Control Plane per namespace/project can be created