-
Notifications
You must be signed in to change notification settings - Fork 208
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
OCM-8679 | test: automated case id:72868 Separate the component route options when updating ingress #2157
base: master
Are you sure you want to change the base?
OCM-8679 | test: automated case id:72868 Separate the component route options when updating ingress #2157
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: valeriiashapoval The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Please rebase and update the commit message. The title and commit message should be |
tests/e2e/test_rosacli_ingress.go
Outdated
"--component-routes", componentRoutes, | ||
) | ||
Expect(err).ToNot(HaveOccurred()) | ||
defer rosaClient.Ingress.EditIngress(clusterID, |
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.
Defer is used to recover the updated data, please not use hardcode but the recorded variable value
tests/e2e/test_rosacli_ingress.go
Outdated
output, err = rosaClient.Ingress.ListIngress(clusterID) | ||
Expect(err).ToNot(HaveOccurred()) | ||
}) | ||
It("cannot update ingress components with incorrect syntax - [id:72868]", |
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.
Combine the It
specs to only one. Our rule need to follow one case one It spec
tests/e2e/test_rosacli_ingress.go
Outdated
Expect(err).ToNot(HaveOccurred()) | ||
}) | ||
It("cannot update ingress components with incorrect syntax - [id:72868]", | ||
labels.Medium, |
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.
For the negative cases, they should be another negative case.
@valeriiashapoval what is the current status of this MR, is it still valid? |
@ciaranRoche yes, testing a few minor changes and rebasing. |
… options when updating ingress
@valeriiashapoval: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
"--component-routes", componentRoutes, | ||
) | ||
Expect(err).ToNot(HaveOccurred()) | ||
|
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 usually define defer function to recover the updated value after the first edit command
) | ||
Expect(err).ToNot(HaveOccurred()) | ||
|
||
_, err = rosaClient.Ingress.EditIngress(clusterID, |
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.
Edit ingress with same parameter called twice.
|
||
By("List ingress to check") | ||
output, err = rosaClient.Ingress.ListIngress(clusterID) | ||
Expect(err).ToNot(HaveOccurred()) |
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.
Here just checked the error is not happening when list the ingress, but it didn't check the edited value showing
Expect(err).To(HaveOccurred()) | ||
Expect(output.String()).Should(ContainSubstring("An error occurred whilst parsing the supplied component routes: only the name of the component should be followed by ':'")) | ||
|
||
By("List ingress to check") |
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 last steps is expecting an error happen, no need to list the ingress for double checking
Expect(err).To(HaveOccurred()) | ||
Expect(output.String()).Should(ContainSubstring("An error occurred whilst parsing the supplied component routes: the expected amount of component routes is 3, but 1 have been supplied")) | ||
|
||
By("List ingress to check") |
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.
Same as above
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2157 +/- ##
=======================================
Coverage 26.92% 26.92%
=======================================
Files 151 151
Lines 21774 21774
=======================================
Hits 5862 5862
Misses 15462 15462
Partials 450 450 ☔ View full report in Codecov by Sentry. |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Link to Test Cases