Skip to content

Commit 44ab624

Browse files
Merge pull request #14444 from nextcloud/bugfix/noid/remote-server-only
tests: Make federation tests do real federation
2 parents 7c90f55 + 86e13f9 commit 44ab624

11 files changed

+368
-397
lines changed

tests/integration/features/bootstrap/FeatureContext.php

+23-66
Large diffs are not rendered by default.

tests/integration/features/federation/call.feature

+56-56
Large diffs are not rendered by default.

tests/integration/features/federation/chat.feature

+119-127
Large diffs are not rendered by default.

tests/integration/features/federation/invite.feature

+66-61
Large diffs are not rendered by default.

tests/integration/features/federation/join-leave.feature

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Feature: federation/join-leave
1414
Given user "participant1" creates room "room" (v4)
1515
| roomType | 2 |
1616
| roomName | room |
17-
And user "participant1" adds federated_user "participant2@REMOTE" to room "room" with 200 (v4)
17+
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
1818
And using server "REMOTE"
1919
And user "participant2" has the following invitations (v1)
20-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
21-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
20+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
21+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
2222
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
2323
| id | name | type | remoteServer | remoteToken |
2424
| LOCAL::room | room | 2 | LOCAL | room |
@@ -43,11 +43,11 @@ Feature: federation/join-leave
4343
Given user "participant1" creates room "room" (v4)
4444
| roomType | 2 |
4545
| roomName | room |
46-
And user "participant1" adds federated_user "participant2@REMOTE" to room "room" with 200 (v4)
46+
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
4747
And using server "REMOTE"
4848
And user "participant2" has the following invitations (v1)
49-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
50-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
49+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
50+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
5151
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
5252
| id | name | type | remoteServer | remoteToken |
5353
| LOCAL::room | room | 2 | LOCAL | room |
@@ -73,11 +73,11 @@ Feature: federation/join-leave
7373
Given user "participant1" creates room "room" (v4)
7474
| roomType | 2 |
7575
| roomName | room |
76-
And user "participant1" adds federated_user "participant2@REMOTE" to room "room" with 200 (v4)
76+
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
7777
And using server "REMOTE"
7878
And user "participant2" has the following invitations (v1)
79-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
80-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
79+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
80+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
8181
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
8282
| id | name | type | remoteServer | remoteToken |
8383
| LOCAL::room | room | 2 | LOCAL | room |

tests/integration/features/federation/lobby.feature

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
Feature: federation/lobby
22

33
Background:
4-
Given user "participant1" exists
4+
Given using server "REMOTE"
55
And user "participant2" exists
66
And the following "spreed" app config is set
77
| federation_enabled | yes |
8+
And using server "LOCAL"
9+
And user "participant1" exists
10+
And the following "spreed" app config is set
11+
| federation_enabled | yes |
812

913
Scenario: set lobby state
1014
Given user "participant1" creates room "room" (v4)
1115
| roomType | 2 |
1216
| roomName | room name |
1317
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
18+
Given using server "REMOTE"
1419
And user "participant2" has the following invitations (v1)
15-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
16-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
20+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
21+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
1722
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
1823
| id | name | type | remoteServer | remoteToken |
1924
| LOCAL::room | room name | 2 | LOCAL | room |
25+
And using server "LOCAL"
2026
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
27+
Given using server "REMOTE"
2128
Then user "participant2" is participant of room "LOCAL::room" (v4)
2229
| lobbyState |
2330
| 1 |
@@ -27,13 +34,16 @@ Feature: federation/lobby
2734
| roomType | 2 |
2835
| roomName | room |
2936
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
37+
Given using server "REMOTE"
3038
And user "participant2" has the following invitations (v1)
31-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
32-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
39+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
40+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
3341
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
3442
| id | name | type | remoteServer | remoteToken |
3543
| LOCAL::room | room | 2 | LOCAL | room |
44+
And using server "LOCAL"
3645
When user "participant1" sets lobby state for room "room" to "non moderators" for 5 seconds with 200 (v4)
46+
Given using server "REMOTE"
3747
And user "participant2" is participant of room "LOCAL::room" (v4)
3848
| lobbyState |
3949
| 1 |

tests/integration/features/federation/permissions.feature

+45-24
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
11
Feature: federation/permissions
22

33
Background:
4-
Given user "participant1" exists
4+
Given using server "REMOTE"
55
And user "participant2" exists
6+
And user "participant3" exists
7+
And the following "spreed" app config is set
8+
| federation_enabled | yes |
9+
And using server "LOCAL"
10+
And user "participant1" exists
611
And the following "spreed" app config is set
712
| federation_enabled | yes |
813

914
Scenario: set participant permissions
10-
Given user "participant3" exists
1115
And user "participant1" creates room "room" (v4)
1216
| roomType | 2 |
1317
| roomName | room name |
1418
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
19+
Given using server "REMOTE"
1520
And user "participant2" has the following invitations (v1)
16-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
17-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
21+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
22+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
1823
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
1924
| id | name | type | remoteServer | remoteToken |
2025
| LOCAL::room | room name | 2 | LOCAL | room |
26+
Given using server "LOCAL"
2127
And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
28+
Given using server "REMOTE"
2229
And user "participant3" has the following invitations (v1)
23-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
24-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
30+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
31+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
2532
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
2633
| id | name | type | remoteServer | remoteToken |
2734
| LOCAL::room | room name | 2 | LOCAL | room |
28-
When user "participant1" sets permissions for "participant2@{$LOCAL_REMOTE_URL}" in room "room" to "S" with 200 (v4)
35+
Given using server "LOCAL"
36+
When user "participant1" sets permissions for "participant2@{$REMOTE_URL}" in room "room" to "S" with 200 (v4)
37+
Given using server "REMOTE"
2938
Then user "participant2" is participant of room "LOCAL::room" (v4)
3039
| permissions | attendeePermissions |
3140
| CS | CS |
@@ -38,13 +47,16 @@ Feature: federation/permissions
3847
| roomType | 2 |
3948
| roomName | room name |
4049
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
50+
Given using server "REMOTE"
4151
And user "participant2" has the following invitations (v1)
42-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
43-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
52+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
53+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
4454
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
4555
| id | name | type | remoteServer | remoteToken |
4656
| LOCAL::room | room name | 2 | LOCAL | room |
57+
Given using server "LOCAL"
4758
When user "participant1" sets default permissions for room "room" to "LM" with 200 (v4)
59+
Given using server "REMOTE"
4860
Then user "participant2" is participant of room "LOCAL::room" (v4)
4961
| defaultPermissions | attendeePermissions | permissions |
5062
| CLM | D | CLM |
@@ -54,10 +66,13 @@ Feature: federation/permissions
5466
| roomType | 2 |
5567
| roomName | room name |
5668
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
69+
Given using server "REMOTE"
5770
And user "participant2" has the following invitations (v1)
58-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
59-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
71+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
72+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
73+
Given using server "LOCAL"
6074
When user "participant1" sets default permissions for room "room" to "LM" with 200 (v4)
75+
Given using server "REMOTE"
6176
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
6277
| id | name | type | remoteServer | remoteToken |
6378
| LOCAL::room | room name | 2 | LOCAL | room |
@@ -71,9 +86,10 @@ Feature: federation/permissions
7186
| roomName | room name |
7287
When user "participant1" sets default permissions for room "room" to "M" with 200 (v4)
7388
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
89+
Given using server "REMOTE"
7490
And user "participant2" has the following invitations (v1)
75-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
76-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
91+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
92+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
7793
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
7894
| id | name | type | remoteServer | remoteToken |
7995
| LOCAL::room | room name | 2 | LOCAL | room |
@@ -86,15 +102,18 @@ Feature: federation/permissions
86102
| roomType | 2 |
87103
| roomName | room name |
88104
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
105+
Given using server "REMOTE"
89106
And user "participant2" has the following invitations (v1)
90-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
91-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
107+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
108+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
92109
And user "participant2" declines invite to room "room" of server "LOCAL" with 200 (v1)
110+
Given using server "LOCAL"
93111
When user "participant1" sets default permissions for room "room" to "M" with 200 (v4)
94112
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
113+
Given using server "REMOTE"
95114
And user "participant2" has the following invitations (v1)
96-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
97-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
115+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
116+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
98117
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
99118
| id | name | type | remoteServer | remoteToken |
100119
| LOCAL::room | room name | 2 | LOCAL | room |
@@ -103,23 +122,25 @@ Feature: federation/permissions
103122
| CM | D | CM |
104123

105124
Scenario: set participant permissions after setting conversation permissions and then invite another federated user
106-
Given user "participant3" exists
107-
And user "participant1" creates room "room" (v4)
125+
Given user "participant1" creates room "room" (v4)
108126
| roomType | 2 |
109127
| roomName | room name |
110128
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
129+
Given using server "REMOTE"
111130
And user "participant2" has the following invitations (v1)
112-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
113-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
131+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
132+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
114133
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
115134
| id | name | type | remoteServer | remoteToken |
116135
| LOCAL::room | room name | 2 | LOCAL | room |
136+
Given using server "LOCAL"
117137
And user "participant1" sets default permissions for room "room" to "AVP" with 200 (v4)
118-
And user "participant1" sets permissions for "participant2@{$LOCAL_REMOTE_URL}" in room "room" to "S" with 200 (v4)
138+
And user "participant1" sets permissions for "participant2@{$REMOTE_URL}" in room "room" to "S" with 200 (v4)
119139
When user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
140+
Given using server "REMOTE"
120141
And user "participant3" has the following invitations (v1)
121-
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
122-
| LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
142+
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
143+
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
123144
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
124145
| id | name | type | remoteServer | remoteToken |
125146
| LOCAL::room | room name | 2 | LOCAL | room |

0 commit comments

Comments
 (0)