-
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
[Fix] to distinguish between PVC in pending and PVC in bound status #1070
Conversation
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
Robot Results
|
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
1dc62e3
to
26b3534
Compare
26b3534
to
796bc68
Compare
${rc} ${pvc_status_phase}= Run And Return Rc And Output | ||
... oc get pvc -n ${namespace} -o jsonpath='{.items[?(@.metadata.annotations.openshift\\.io/display-name=="${name}")].status.phase}' # robocop: disable | ||
Should Be Equal As Integers ${rc} 0 An error occurred during the check of PVC ${name} .status.phase value! | ||
IF "${pvc_status_phase}" == "Pending" |
Check notice
Code scanning / Robocop
Variable '{{ name }}' in '{{ block_name }}' condition has unnecessary string conversion Note test
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.
In general it looks ok to me, but I'd like to understand a bit more what the last check on the PVC does after the if/else block. Perhaps add a line or two of comments to explain the flow?
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Show resolved
Hide resolved
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Show resolved
Hide resolved
796bc68
to
7c598f0
Compare
7c598f0
to
9be52ad
Compare
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
9be52ad
to
dfed425
Compare
Wait Until Page Contains Element ${storage_size_el} timeout=20s | ||
${displayed_size}= Get Text ${storage_size_el} | ||
Run Keyword And Continue On Failure Should Be Equal As Strings ${displayed_size} Max ${size}Gi | ||
ELSE IF "${pvc_status_phase}" == "Bound" |
Check notice
Code scanning / Robocop
Variable '{{ name }}' in '{{ block_name }}' condition has unnecessary string conversion Note test
ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource
Fixed
Show fixed
Hide fixed
@lugi0 Updated addressing both your comments. Will re-run CI now. Please let me know whether it looks good now 🙂 |
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.
thanks @jstourac , LGTM
dfed425
to
d337f74
Compare
The storage size is shown in the UI depending of the PVC status. Before the PVC is bounded, there is shown 'Max XXGi' (or other unit). After the PVC has been bound (even after it has been de-attached from a workbench) then there is something like: 'XXGi [## ] YYGi' - so there is shown both the capacity that is taken and total capacity of the storage; in the middle of them, there is a graphical element to show how much the capacity is used.
d337f74
to
cd237b3
Compare
Kudos, SonarCloud Quality Gate passed! |
I just noticed a robocop warning so I rebased and pushed this change only. |
@jstourac LGTM! thanks for raising this one. In my mind, we should be able to test all the situations (pending, success, failure) explicitly. This fix is great but we are not assuming an expected behavior in the test, while IMO we should if we care of this particular UI aspect. Wdyt? (ofc anybody who has an option about this, feel free to join the discussion) (i'm approving the PR because it would let our tests to run smoothly for now, and I'd agree that this particular aspect of the UI doesn't have the highest priority for us) |
@bdattoma thank you for your review! Yeah, I agree that we should probably extend test to assume the PVC state there and extend to check also the |
up to you, to me it would also be okay just to have in our Jira backlog |
The storage size is shown in the UI depending of the PVC status. Before the PVC is bounded, there is shown 'Max XXGi' (or other unit). After the PVC has been bound (even after it has been de-attached from a workbench)
then there is something like: 'XXGi [## ] YYGi' - so there is shown
both the capacity that is taken and total capacity of the storage; in
the middle of them, there is a graphical element to show how much the
capacity is used.
CI: rhods-ci-pr-test/2198 - pass of this test should be enough since this method is used only in one other test and that one is tagged with
AutomationBug
so it's irrelevant for now anyway.