Skip to content

Commit 1a5d5cd

Browse files
committed
test: test coverage for trying to delete deleted user
1 parent 482bc0c commit 1a5d5cd

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

tests/acceptance/bootstrap/OcmContext.php

+1
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ public function theUserWaitsForTokenToExpire(int $number): void {
287287

288288
/**
289289
* @When user :user deletes federated connection with user :ocmUser using the Graph API
290+
* @When user :user tries to delete federated connection with user :ocmUser using the Graph API
290291
*
291292
* @param string $user
292293
* @param string $ocmUser

tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ The expected failures in this file are from features in the owncloud/ocis repo.
249249
#### [OCM. federated connection is not dropped when one of the users deletes the connection](https://github.com/owncloud/ocis/issues/10216)
250250

251251
- [apiOcm/deleteFederatedConnections.feature:21](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/deleteFederatedConnections.feature#L21)
252-
- [apiOcm/deleteFederatedConnections.feature:67](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/deleteFederatedConnections.feature#L67)
252+
- [apiOcm/deleteFederatedConnections.feature:63](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/deleteFederatedConnections.feature#L63)
253253

254254
#### [OCM. server crash after deleting share for ocm user](https://github.com/owncloud/ocis/issues/10213)
255255

256-
- [apiOcm/deleteFederatedConnections.feature:102](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/deleteFederatedConnections.feature#L102)
256+
- [apiOcm/deleteFederatedConnections.feature:94](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/deleteFederatedConnections.feature#L94)
257257

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

@@ -332,5 +332,8 @@ The expected failures in this file are from features in the owncloud/ocis repo.
332332
- [apiOcm/share.feature:1154](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L1154)
333333
- [apiOcm/share.feature:1174](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L1174)
334334

335+
#### [OCM. delete-accepted-user endpoint always returns 200](https://github.com/owncloud/ocis/issues/10223)
336+
- [apiOcm/deleteFederatedConnections.feature:125](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/deleteFederatedConnections.feature#L125)
337+
335338
Note: always have an empty line at the end of this file.
336339
The bash script that processes this file requires that the last line has a newline on the end.

tests/acceptance/features/apiOcm/deleteFederatedConnections.feature

+9-17
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,19 @@ Feature: delete federated connections
55

66
Background:
77
Given user "Alice" has been created with default attributes
8+
And "Alice" has created the federation share invitation
89
And using server "REMOTE"
910
And user "Brian" has been created with default attributes
11+
And "Brian" has accepted invitation
1012

1113

1214
Scenario: federated user deletes the federated connection
13-
Given using server "LOCAL"
14-
And "Alice" has created the federation share invitation
15-
And using server "REMOTE"
16-
And "Brian" has accepted invitation
1715
When user "Brian" deletes federated connection with user "Alice" using the Graph API
1816
Then the HTTP status code should be "200"
1917

2018
@issue-10216
2119
Scenario: users should not be able to find federated user after federated user has deleted connection
22-
Given using server "LOCAL"
23-
And "Alice" has created the federation share invitation
24-
And using server "REMOTE"
25-
And "Brian" has accepted invitation
26-
And user "Brian" has deleted federated connection with user "Alice"
20+
Given user "Brian" has deleted federated connection with user "Alice"
2721
And using server "LOCAL"
2822
When user "Alice" searches for federated user "Brian" using Graph API
2923
Then the HTTP status code should be "200"
@@ -66,10 +60,6 @@ Feature: delete federated connections
6660
@issue-10216
6761
Scenario: federated user should not be able to find federated share after federated user has deleted connection
6862
Given using server "LOCAL"
69-
And "Alice" has created the federation share invitation
70-
And using server "REMOTE"
71-
And "Brian" has accepted invitation
72-
And using server "LOCAL"
7363
And user "Alice" has created folder "folderToShare"
7464
And user "Alice" has sent the following resource share invitation to federated user:
7565
| resource | folderToShare |
@@ -101,10 +91,6 @@ Feature: delete federated connections
10191
@issue-10213
10292
Scenario: federated user should not be able to find federated share after local user has deleted connection
10393
Given using server "LOCAL"
104-
And "Alice" has created the federation share invitation
105-
And using server "REMOTE"
106-
And "Brian" has accepted invitation
107-
And using server "LOCAL"
10894
And user "Alice" has created folder "folderToShare"
10995
And user "Alice" has sent the following resource share invitation to federated user:
11096
| resource | folderToShare |
@@ -132,3 +118,9 @@ Feature: delete federated connections
132118
}
133119
}
134120
"""
121+
122+
@issue-10223
123+
Scenario: federated user tries to delete previously deleted federated connection
124+
Given user "Brian" has deleted federated connection with user "Alice"
125+
When user "Brian" tries to delete federated connection with user "Alice" using the Graph API
126+
Then the HTTP status code should be "404"

0 commit comments

Comments
 (0)