-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add unit tests for AdminDelegation command and AuthorizedGroupService #55676
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
Add unit tests for AdminDelegation command and AuthorizedGroupService #55676
Conversation
9fe7144 to
13a5410
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.
Pull Request Overview
This PR adds comprehensive unit tests for the AdminDelegation Add command and AuthorizedGroupService to support future functionality extensions. The tests validate the core delegation functionality including permission creation, input validation, and error handling scenarios.
Key changes:
- Added unit tests for AuthorizedGroupService covering group-class relationship validation
- Added unit tests for AdminDelegation Add command covering success and error scenarios
- Implemented reflection-based testing approach for protected command execution methods
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/settings/tests/Service/AuthorizedGroupServiceTest.php | Tests for AuthorizedGroupService validating creation of authorized groups with different group/class combinations |
| apps/settings/tests/Command/AdminDelegation/AddTest.php | Tests for AdminDelegation Add command covering successful delegation, invalid setting classes, and non-existent groups |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
e562481 to
43476fb
Compare
provokateurin
left a comment
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.
LGTM, just two minor things that you might want to change.
b742eff to
0721e52
Compare
…edGroupService Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
to simplify test execution Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
0721e52 to
4275825
Compare
|
I assume with 3 review ok - it can be merged to master @come-nc |
|
/backport to stable31 |
|
The backport to # Switch to the target branch and update it
git checkout stable31
git pull origin stable31
# Create the new backport branch
git checkout -b backport/55676/stable31
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick b0413be6 42758251
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/55676/stable31Error: Failed to push branch backport/55676/stable31: remote: Invalid username or token. Password authentication is not supported for Git operations. Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
|
/backport to stable32 |
Summary
admin-delegation:addin order to extend admin-delegation functionality laterChecklist
3. to review, feature component)stable32)