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 test to share project drive's resource to a federated user #10264

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ The expected failures in this file are from features in the owncloud/ocis repo.

#### [OCM. Prevent federated users from being added as members of the space](https://github.com/owncloud/ocis/issues/10051)

- [apiOcm/share.feature:231](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L231)
- [apiOcm/share.feature:232](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L232)
- [apiOcm/share.feature:233](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L233)
- [apiOcm/share.feature:307](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L307)
- [apiOcm/share.feature:308](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L308)
- [apiOcm/share.feature:309](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L309)

#### [same href in REPORT request for all dav-path-version](https://github.com/owncloud/ocis/issues/7060)

Expand Down
78 changes: 77 additions & 1 deletion tests/acceptance/features/apiOcm/share.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@ocm
Feature: an user shares resources usin ScienceMesh application
Feature: an user shares resources using ScienceMesh application
As a user
I want to share resources between different ocis instances

Expand Down Expand Up @@ -100,6 +100,82 @@ Feature: an user shares resources usin ScienceMesh application
| folderToShare |
| textfile.txt |


Scenario: local user shares resources from project space to federation user
saw-jan marked this conversation as resolved.
Show resolved Hide resolved
Given using server "LOCAL"
And "Alice" has created the federation share invitation
And using server "REMOTE"
And "Brian" has accepted invitation
And using server "LOCAL"
And using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
And user "Alice" has created a folder "folderToShare" in space "projectSpace"
When user "Alice" sends the following resource share invitation to federated user using the Graph API:
| resource | folderToShare |
| space | projectSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
| federatedServer | @federation-ocis-server:10200 |
Then the HTTP status code should be "200"
When using server "REMOTE"
And user "Brian" lists the shares shared with him without retry using the Graph API
Then the HTTP status code should be "200"
saw-jan marked this conversation as resolved.
Show resolved Hide resolved
And the JSON data of the response should match
"""
{
"type": "object",
"required": [ "value" ],
"properties": {
"value": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@UI.Hidden",
"@client.synchronize",
"createdBy",
"name"
],
"properties": {
"@UI.Hidden": {
"const": false
},
"@client.synchronize": {
"const": false
},
"createdBy": {
"type": "object",
"required": [ "user" ],
"properties": {
"user": {
"type": "object",
"required": [ "displayName", "id" ],
"properties": {
"displayName": {
"const": "Alice Hansen"
},
"id": {
"type": "string",
"pattern": "^%federated_user_id_pattern%$"
}
}
}
}
},
"name": {
"const": "folderToShare"
}
}
}
}
}
}
"""

@issue-9534
Scenario Outline: federation user shares resource to local user after accepting invitation
Given using server "LOCAL"
Expand Down