Skip to content

Conversation

@printminion-co
Copy link
Contributor

@printminion-co printminion-co commented Oct 10, 2025

Summary

  • php unitests are testing occ admin-delegation:add in order to extend admin-delegation functionality later
occ admin-delegation:add OCA\\DAV\\Settings\\CalDAVSettings group1 

Checklist

@printminion-co printminion-co force-pushed the feature/add_tests_to_settings_delegation branch from 9fe7144 to 13a5410 Compare October 10, 2025 15:26
Copy link

Copilot AI left a 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.

@printminion-co printminion-co marked this pull request as ready for review October 10, 2025 15:45
@printminion-co printminion-co requested a review from a team as a code owner October 10, 2025 15:45
@printminion-co printminion-co requested review from Altahrim, CarlSchwan and salmart-dev and removed request for a team October 10, 2025 15:45
@printminion-co printminion-co force-pushed the feature/add_tests_to_settings_delegation branch from e562481 to 43476fb Compare October 13, 2025 08:55
@sorbaugh sorbaugh requested a review from come-nc October 14, 2025 08:40
Copy link
Member

@provokateurin provokateurin left a 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.

@printminion-co printminion-co force-pushed the feature/add_tests_to_settings_delegation branch 4 times, most recently from b742eff to 0721e52 Compare October 17, 2025 08:22
…edGroupService

Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
to simplify test execution

Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
@printminion-co printminion-co force-pushed the feature/add_tests_to_settings_delegation branch from 0721e52 to 4275825 Compare October 20, 2025 10:55
@printminion-co
Copy link
Contributor Author

printminion-co commented Oct 20, 2025

I assume with 3 review ok - it can be merged to master @come-nc

@sorbaugh sorbaugh merged commit d49dc7e into nextcloud:master Oct 21, 2025
174 of 177 checks passed
@printminion-co
Copy link
Contributor Author

/backport to stable31

@backportbot
Copy link

backportbot bot commented Oct 21, 2025

The backport to stable31 failed. Please do this backport manually.

# 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/stable31

Error: Failed to push branch backport/55676/stable31: remote: Invalid username or token. Password authentication is not supported for Git operations.
fatal: Authentication failed for 'https://github.com/nextcloud/server.git/'


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@github-actions
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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.)

@printminion-co printminion-co deleted the feature/add_tests_to_settings_delegation branch October 28, 2025 09:28
@artonge artonge added this to the Nextcloud 33 milestone Oct 28, 2025
@artonge
Copy link
Contributor

artonge commented Oct 28, 2025

/backport to stable32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants