-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
chore: adding test coverage for the notification_controller #13339
Merged
jannfis
merged 10 commits into
argoproj:master
from
zhaque44:notification-controller-tests
Apr 27, 2023
Merged
chore: adding test coverage for the notification_controller #13339
jannfis
merged 10 commits into
argoproj:master
from
zhaque44:notification-controller-tests
Apr 27, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: zhaque44 <haque.zubair@gmail.com>
…oller Signed-off-by: zhaque44 <haque.zubair@gmail.com>
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #13339 +/- ##
==========================================
+ Coverage 49.01% 49.06% +0.04%
==========================================
Files 247 248 +1
Lines 42685 42810 +125
==========================================
+ Hits 20924 21006 +82
- Misses 19645 19684 +39
- Partials 2116 2120 +4 ☔ View full report in Codecov by Sentry. |
Signed-off-by: zhaque44 <haque.zubair@gmail.com>
Signed-off-by: zhaque44 <haque.zubair@gmail.com>
Signed-off-by: zhaque44 <haque.zubair@gmail.com>
Signed-off-by: zhaque44 <haque.zubair@gmail.com>
Signed-off-by: zhaque44 <haque.zubair@gmail.com>
…enarios Signed-off-by: zhaque44 <haque.zubair@gmail.com>
…ct" field and returns nil Signed-off-by: zhaque44 <haque.zubair@gmail.com>
Signed-off-by: zhaque44 <haque.zubair@gmail.com>
jannfis
approved these changes
Apr 27, 2023
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, appreciated!
LGTM.
yyzxw
pushed a commit
to yyzxw/argo-cd
that referenced
this pull request
Aug 9, 2023
…#13339) * Adding unit tests for the Init function: for the notification controller Signed-off-by: zhaque44 <haque.zubair@gmail.com> * Adding unit tests for getAppProj function: for the notification controller Signed-off-by: zhaque44 <haque.zubair@gmail.com> * fixing linting errors for indexer.Add in build Signed-off-by: zhaque44 <haque.zubair@gmail.com> * rm appProj test(s) to assess linting issue Signed-off-by: zhaque44 <haque.zubair@gmail.com> * adding first test case for getAppProj Signed-off-by: zhaque44 <haque.zubair@gmail.com> * add happy path for getAppProj func() Signed-off-by: zhaque44 <haque.zubair@gmail.com> * updating test function to reduce duplication Signed-off-by: zhaque44 <haque.zubair@gmail.com> * sanity test fot getAppProj: rm test struct pattern to test generic scenarios Signed-off-by: zhaque44 <haque.zubair@gmail.com> * verifies that getAppProj gracefully handles input with missing "project" field and returns nil Signed-off-by: zhaque44 <haque.zubair@gmail.com> * chore: isAppSyncStatusRefreshed test for improved coverage Signed-off-by: zhaque44 <haque.zubair@gmail.com> --------- Signed-off-by: zhaque44 <haque.zubair@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding tests for the
notifications_controller
|controller
package:Init
function.This test helps ArgoCD users because:
Kubernetes client
andinformers
, as well as therequired labels
andsecrets/config maps
. This is important because users of the package may be using it in different environments with different configurations, so it's important to ensure that the package is properly configured to function correctly in any environment.Added test for
getAppProj
function.getAppProj
gracefully handles missing field and returns nil when that happens.Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist:
Please see Contribution FAQs if you have questions about your pull-request.