-
Notifications
You must be signed in to change notification settings - Fork 135
Add CEL tests for snippetsFilter API #3750
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3750 +/- ##
=======================================
Coverage 86.88% 86.88%
=======================================
Files 128 128
Lines 16201 16201
Branches 62 62
=======================================
Hits 14076 14076
+ Misses 1952 1951 -1
- Partials 173 174 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
@salonichf5 these are really great tests that you have added, however we want to keep these tests focused on results from the x-kubernetes-validations
errors
For the SnippetsFilter CR, the error we want to test against is this one:
x-kubernetes-validations:
- message: Only one snippet allowed per context
rule: self.all(s1, self.exists_one(s2, s1.context == s2.context))
Lets keep the test file name and the function names consistent. For the file name, it should be |
d7fd391
to
c0da0aa
Compare
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.
nice!
d94867b
to
5ef8cb4
Compare
Proposed changes
Write a clear and concise description that helps reviewers understand the purpose and impact of your changes. Use the
following format:
Problem: As code owners we want to verify is API validation is working as expected for SnippetsFilter
Solution: Added CEL tests for SnippetsFilter
Testing: Describe any testing that you did.
Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
specific feedback, add them here.
Closes #3671
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.