-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[PM-18088] Add unit test coverage for admin methods on CiphersController and CipherService #5460
base: ac/pm-18087/add-cipher-permissions-to-response-models
Are you sure you want to change the base?
Conversation
…d soft delete methods
- Add tests for provider user scenarios in admin cipher management methods - Implement tests for custom user with edit any collection permissions - Add test coverage for RestrictProviderAccess feature flag - Improve test scenarios for delete, soft delete, and restore operations
…llection permission checks - Extend CiphersControllerTests with scenarios for custom users without EditAnyCollection permission - Add test methods to verify NotFoundException is thrown when EditAnyCollection is false - Cover delete, soft delete, and restore operations for single and bulk cipher admin actions
- Add test methods for admin and owner roles with specific cipher access scenarios - Implement tests for accessing specific and unassigned ciphers - Extend test coverage for delete, soft delete, and restore operations - Improve test method naming for clarity and precision
…nassigned ciphers - Implement test methods for DeleteManyAdmin and PutDeleteManyAdmin - Cover scenarios for owner and admin roles with access to specific and unassigned ciphers - Verify correct invocation of DeleteManyAsync and SoftDeleteManyAsync methods - Enhance test coverage for bulk cipher admin operations
|
New Issues (27)Checkmarx found the following issues in this Pull Request
Fixed Issues (11)Great job! The following issues were fixed in this Pull Request
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## ac/pm-18087/add-cipher-permissions-to-response-models #5460 +/- ##
=========================================================================================
+ Coverage 44.44% 44.60% +0.16%
=========================================================================================
Files 1531 1531
Lines 71086 71086
Branches 6373 6373
=========================================================================================
+ Hits 31593 31707 +114
+ Misses 38125 38009 -116
- Partials 1368 1370 +2 ☔ View full report in Codecov by Sentry. |
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 love the approach and thank you for expanding the test suite!
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-18088
📔 Objective
To begin implementing the changes for PM-18088, I wanted to write unit tests first. However, since none existed, this PR focuses on adding test coverage for the current implementation.
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes