Skip to content

Commit 85d12e5

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

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-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:124](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/deleteFederatedConnections.feature#L124)
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

+11-17
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,19 @@ Feature: delete federated connections
77
Given user "Alice" has been created with default attributes
88
And using server "REMOTE"
99
And user "Brian" has been created with default attributes
10-
11-
12-
Scenario: federated user deletes the federated connection
13-
Given using server "LOCAL"
10+
And using server "LOCAL"
1411
And "Alice" has created the federation share invitation
1512
And using server "REMOTE"
1613
And "Brian" has accepted invitation
14+
15+
16+
Scenario: federated user deletes the federated connection
1717
When user "Brian" deletes federated connection with user "Alice" using the Graph API
1818
Then the HTTP status code should be "200"
1919

2020
@issue-10216
2121
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"
22+
Given user "Brian" has deleted federated connection with user "Alice"
2723
And using server "LOCAL"
2824
When user "Alice" searches for federated user "Brian" using Graph API
2925
Then the HTTP status code should be "200"
@@ -66,10 +62,6 @@ Feature: delete federated connections
6662
@issue-10216
6763
Scenario: federated user should not be able to find federated share after federated user has deleted connection
6864
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"
7365
And user "Alice" has created folder "folderToShare"
7466
And user "Alice" has sent the following resource share invitation to federated user:
7567
| resource | folderToShare |
@@ -101,10 +93,6 @@ Feature: delete federated connections
10193
@issue-10213
10294
Scenario: federated user should not be able to find federated share after local user has deleted connection
10395
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"
10896
And user "Alice" has created folder "folderToShare"
10997
And user "Alice" has sent the following resource share invitation to federated user:
11098
| resource | folderToShare |
@@ -132,3 +120,9 @@ Feature: delete federated connections
132120
}
133121
}
134122
"""
123+
124+
@issue-10223
125+
Scenario: federated user tries to delete previously deleted federated connection
126+
Given user "Brian" has deleted federated connection with user "Alice"
127+
When user "Brian" tries to delete federated connection with user "Alice" using the Graph API
128+
Then the HTTP status code should be "404"

0 commit comments

Comments
 (0)