test(files_sharing): Check mount events are dispatched for share recipients - #64715
Draft
marcelklehr wants to merge 2 commits into
Draft
marcelklehr wants to merge 2 commits into
marcelklehr wants to merge 2 commits into
Conversation
…pients Apps keep per-user data in sync with file access by listening to UserMountAddedEvent and UserMountRemovedEvent. When a share is created or deleted, these events should reach the recipient at the latest when the recipient next sets up their file system. Assisted-by: ClaudeCode:claude-opus-5.5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Open
1 task
provokateurin
requested changes
Sep 24, 2026
| */ | ||
| private function setupFileSystem(string $userId): void { | ||
| $this->loginHelper($userId); | ||
| $this->rootFolder->getUserFolder($userId)->getDirectoryListing(); |
Member
There was a problem hiding this comment.
Not necessary and also not the right way to setup the FS, which doesn't even need an explicit initialization.
Member
Author
There was a problem hiding this comment.
If the FS doesn't need an explicit initialization, how would you have me test this behavior?
Member
There was a problem hiding this comment.
To check if the mounts exist, just get the expected path from the user folder. After you verified that, you can check that the events fired.
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This branch has not been deployed
This file contains hidden or 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
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.
Summary
For user shares and group shares, creating a share should dispatch a UserMountAddedEvent for the recipient's share mount, and deleting it should dispatch a UserMountRemovedEvent. These tests only asks for this "at the latest when the recipient next loads their file system". Each case runs twice:
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)