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

[tests-only][full-ci] add tests to remove access of shared resource to federated user #10672

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

prashant-gurung899
Copy link
Contributor

Description

This PR adds tests to remove access of a shared resource to federated user( both local and remote).

Scenario: local user deletes access of shared resource to federated user
Scenario: federation user deletes access of shared resource to local user

Related Issue

Motivation and Context

How Has This Been Tested?

  • Locally
  • CI

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@prashant-gurung899 prashant-gurung899 force-pushed the tests-ocm-delete-share branch 4 times, most recently from e3266d0 to 7ba257a Compare November 28, 2024 08:47
@prashant-gurung899
Copy link
Contributor Author

prashant-gurung899 commented Nov 29, 2024

This PR is on hold because of bug; #10689
So, moving it to blocked for now.

@prashant-gurung899
Copy link
Contributor Author

Moving it back to in progress from blocked

@prashant-gurung899 prashant-gurung899 force-pushed the tests-ocm-delete-share branch 2 times, most recently from 9474779 to 208932e Compare December 11, 2024 06:15
Copy link

sonarcloud bot commented Dec 11, 2024

*
* @return void
*/
public function userShouldHaveFederatedShareSharedByUserFromSpace(string $sharee, string $shouldOrNot, string $share, string $sharer, string $space): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function userShouldHaveFederatedShareSharedByUserFromSpace(string $sharee, string $shouldOrNot, string $share, string $sharer, string $space): void {
public function userShouldOrShouldNotHaveFederatedShareSharedByUserFromSpace(string $sharee, string $shouldOrNot, string $share, string $sharer, string $space): void {

Just my suggestion

@@ -1738,36 +1738,39 @@ public function userRemovesTheLastLinkShareOfSpaceUsingPermissionsEndpointOfGrap
* @param string $sharer
* @param string $space
* @param bool $shouldExist
* @param bool|null $federatedSHare
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param bool|null $federatedSHare
* @param bool $federatedSHare

*
* @return void
* @throws GuzzleException
* @throws JsonException
* @throws Exception
*/
public function checkIfShareExists(string $share, string $sharee, string $sharer, string $space, bool $shouldExist = true): void {
public function checkIfShareExists(string $share, string $sharee, string $sharer, string $space, bool $shouldExist = true, ?bool $federatedSHare= false): void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function checkIfShareExists(string $share, string $sharee, string $sharer, string $space, bool $shouldExist = true, ?bool $federatedSHare= false): void {
public function checkIfShareExists(string $share, string $sharee, string $sharer, string $space, bool $shouldExist = true, bool $federatedShare = false): void {

@@ -1229,3 +1229,24 @@ Feature: an user shares resources using ScienceMesh application
}
}
"""

@issue-10213
Scenario: local user deletes access of shared resource to federated user
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Scenario: local user deletes access of shared resource to federated user
Scenario: local user removes access of federated user from a resource

Comment on lines +1250 to +1252
And user "Brian" lists the shares shared with him without retry using the Graph API
Then the HTTP status code should be "200"
And user "Brian" should not have a federated share "FOLDER" shared by user "Alice" from space "Personal"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
And user "Brian" lists the shares shared with him without retry using the Graph API
Then the HTTP status code should be "200"
And user "Brian" should not have a federated share "FOLDER" shared by user "Alice" from space "Personal"
Then user "Brian" should not have a federated share "FOLDER" shared by user "Alice" from space "Personal"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants