Skip to content
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

[Sharing NG] Add tests coverage for (enable sync/disable sync) share #8486

Closed
23 tasks done
amrita-shrestha opened this issue Feb 19, 2024 · 15 comments
Closed
23 tasks done
Assignees
Labels

Comments

@amrita-shrestha
Copy link
Contributor

amrita-shrestha commented Feb 19, 2024

Description

This PR #7885 adds api endpoint for accept/decline share. After PR merge, add test coverage

Edge cases:

Previously, the phrase mount and unmount was used. Currently enable and disable share is used. PR that refactors this change:

@amrita-shrestha amrita-shrestha changed the title [Shareing NG] Add tests coverage for accept/decline share [Sharing NG] Add tests coverage for accept/decline share Feb 19, 2024
@S-Panta
Copy link
Contributor

S-Panta commented Mar 7, 2024

For declining disabling sync an upcoming share

curl -X DELETE 'https://host.docker.internal:9200/graph/v1beta1/drives/{drive-id}/items/{item-id}' -u username:password

This will change @client.synchronize property of the item to false (disable sync) which refer to declining incoming share

See #7792 (comment)
Swagger Reference: driveItem

@S-Panta
Copy link
Contributor

S-Panta commented Mar 7, 2024

For accepting pending share enabling share sync

curl -X POST 'https://host.docker.internal:9200/graph/v1beta1/drives/{share-Space-Id}/root/children'  
-d '{
    "remoteItem": {
        "id":"'remote-item-id"
    }
}'

This request returns drive item . remote-item-id and permission-id can be received from sharedWithMe object . Only item id is needed
See drives.root

@S-Panta S-Panta changed the title [Sharing NG] Add tests coverage for mount/unmount (accept/decline) share [Sharing NG] Add tests coverage for (sync/disable sync) share Apr 5, 2024
@S-Panta S-Panta changed the title [Sharing NG] Add tests coverage for (sync/disable sync) share [Sharing NG] Add tests coverage for (enable sync/disable sync) share Apr 8, 2024
@saw-jan
Copy link
Member

saw-jan commented Apr 16, 2024

@S-Panta @SagarGi @nirajacharya2 Please, check if this can be closed or not

@S-Panta
Copy link
Contributor

S-Panta commented Apr 16, 2024

I think there are two bugs reported relating to enable and disable share. Test should be written to cover those scenarios too

@saw-jan
Copy link
Member

saw-jan commented Apr 16, 2024

I think there are two bugs reported relating to enable and disable share. Test should be written to cover those scenarios too

update the links if test has been added and check if those issues are tracked in other qa tickets or not

@saw-jan
Copy link
Member

saw-jan commented Apr 25, 2024

  • sharer deleted (user/group) when sync enabled
    • Personal
    • Project
  • sharer deleted (user/group) when sync disabled
    • Personal
    • Project

@amrita-shrestha Could elaborate the scenario for these?
Similar to these scenarios or different?

Scenario: user lists shared resources for deleted sharee

Scenario: user lists shared resources for deleted group

Scenario: user lists the folder shared with them from project space after the sharer is deleted

Scenario: user lists the file shared with them from personal space after the sharer is deleted

@saw-jan
Copy link
Member

saw-jan commented Apr 25, 2024

I am extending coverage in #8964 if that's the case

@saw-jan
Copy link
Member

saw-jan commented Apr 25, 2024

And in #8967

@amrita-shrestha
Copy link
Contributor Author

amrita-shrestha commented May 9, 2024

@saw-jan @S-Panta, it appears that your PRs cover some scenarios, but there are still some that could be added to the "enable and disable sync" feature file. Those extended scenarios involve checking if the list shared with me lists all resources or not. However, what we need to address in the "enable/disable sync" is whether a user can change the sync state of shared resources whose owner has been deleted.
Additionally, we need to consider scenarios where a shared resource's sync state is changed and the sharee(user/group to whom resource is deleted) is deleted. In these cases, the sharer(resource owner) needs to check whether the shared resource contains information about the deleted user in the propfind response or not? similar to mentioned in this issue #9119

@S-Panta
Copy link
Contributor

S-Panta commented May 9, 2024

I will check on these scenerio.

@saw-jan @S-Panta, it appears that your PRs cover some scenarios, but there are still some that could be added to the "enable and disable sync" feature file. Those extended scenarios involve checking if the list shared with me lists all resources or not. However, what we need to address in the "enable/disable sync" is whether a user can change the sync state of shared resources whose owner has been deleted. Additionally, we need to consider scenarios where a shared resource's sync state is changed and the sharee(user/group to whom resource is deleted) is deleted. In these cases, the sharer(resource owner) needs to check whether the shared resource contains information about the deleted user in the propfind response or not?

@saw-jan
Copy link
Member

saw-jan commented May 29, 2024

@S-Panta What's the status of the remaining tasks here?

@S-Panta
Copy link
Contributor

S-Panta commented May 29, 2024

@S-Panta What's the status of the remaining tasks here?

Beside contract testing, I feel like most of the scenarios for this endpoint is covered.

@saw-jan
Copy link
Member

saw-jan commented May 29, 2024

Could you add those to the other mentioned issue? Then we can close this one

@S-Panta
Copy link
Contributor

S-Panta commented May 30, 2024

I have linked the share in another issue. I think we can close this now

@S-Panta S-Panta closed this as completed May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants