Skip to content

Commit 70c89ea

Browse files
committed
test: refactor feature files to make services use their own configs
1 parent 8461e13 commit 70c89ea

File tree

4 files changed

+40
-47
lines changed

4 files changed

+40
-47
lines changed

.drone.star

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ config = {
9999
"apiContract",
100100
"apiLocks",
101101
],
102-
"skip": True,
102+
"skip": False,
103103
"k8s": True,
104104
},
105105
"settingsAndNotification": {
@@ -108,7 +108,7 @@ config = {
108108
"apiNotification",
109109
"apiCors",
110110
],
111-
"skip": True,
111+
"skip": False,
112112
"withRemotePhp": [False],
113113
"emailNeeded": True,
114114
"extraEnvironment": {
@@ -128,22 +128,22 @@ config = {
128128
"suites": [
129129
"apiGraphUser",
130130
],
131-
"skip": True,
131+
"skip": False,
132132
"withRemotePhp": [False],
133133
"k8s": True,
134134
},
135135
"spaces": {
136136
"suites": [
137137
"apiSpaces",
138138
],
139-
"skip": True,
139+
"skip": False,
140140
"k8s": True,
141141
},
142142
"spacesShares": {
143143
"suites": [
144144
"apiSpacesShares",
145145
],
146-
"skip": True,
146+
"skip": False,
147147
"k8s": True,
148148
},
149149
"davOperations": {
@@ -155,7 +155,7 @@ config = {
155155
"apiArchiver",
156156
"apiActivities",
157157
],
158-
"skip": True,
158+
"skip": False,
159159
},
160160
"groupAndSearch1": {
161161
"suites": [
@@ -164,7 +164,7 @@ config = {
164164
"apiGraphGroup",
165165
"apiServiceAvailability",
166166
],
167-
"skip": True,
167+
"skip": False,
168168
"k8s": False,
169169
},
170170
"search2": {
@@ -173,7 +173,7 @@ config = {
173173
"apiSearchContent",
174174
],
175175
"tikaNeeded": True,
176-
"skip": True,
176+
"skip": False,
177177
"k8s": False,
178178
},
179179
"sharingNg1": {
@@ -182,15 +182,15 @@ config = {
182182
"apiReshare",
183183
"apiSharingNgPermissions",
184184
],
185-
"skip": True,
185+
"skip": False,
186186
"withRemotePhp": [False],
187187
"k8s": True,
188188
},
189189
"sharingNgAdditionalShareRole": {
190190
"suites": [
191191
"apiSharingNgAdditionalShareRole",
192192
],
193-
"skip": True,
193+
"skip": False,
194194
"k8s": True,
195195
"withRemotePhp": [False],
196196
},
@@ -199,7 +199,7 @@ config = {
199199
"apiSharingNgDriveInvitation",
200200
"apiSharingNgItemInvitation",
201201
],
202-
"skip": True,
202+
"skip": False,
203203
"withRemotePhp": [False],
204204
},
205205
"sharingNgLinkShare": {
@@ -216,7 +216,7 @@ config = {
216216
"suites": [
217217
"apiAntivirus",
218218
],
219-
"skip": True,
219+
"skip": False,
220220
"antivirusNeeded": True,
221221
"extraServerEnvironment": {
222222
"ANTIVIRUS_SCANNER_TYPE": "clamav",
@@ -231,7 +231,7 @@ config = {
231231
"apiOcm",
232232
"apiAuthApp",
233233
],
234-
"skip": True,
234+
"skip": False,
235235
"withRemotePhp": [False],
236236
"federationServer": True,
237237
"emailNeeded": True,
@@ -259,7 +259,7 @@ config = {
259259
"suites": [
260260
"apiCollaboration",
261261
],
262-
"skip": True,
262+
"skip": False,
263263
"withRemotePhp": [False],
264264
"collaborationServiceNeeded": True,
265265
"extraServerEnvironment": {
@@ -270,7 +270,7 @@ config = {
270270
"suites": [
271271
"cliCommands",
272272
],
273-
"skip": True,
273+
"skip": False,
274274
"withRemotePhp": [False],
275275
"antivirusNeeded": True,
276276
"emailNeeded": True,
@@ -299,7 +299,7 @@ config = {
299299
"coreApiMain",
300300
"coreApiVersions",
301301
],
302-
"skip": True,
302+
"skip": False,
303303
"withRemotePhp": [False],
304304
"k8s": True,
305305
},
@@ -308,7 +308,7 @@ config = {
308308
"coreApiShareManagementBasicToShares",
309309
"coreApiShareManagementToShares",
310310
],
311-
"skip": True,
311+
"skip": False,
312312
"k8s": True,
313313
"withRemotePhp": [False],
314314
},
@@ -317,7 +317,7 @@ config = {
317317
"coreApiSharees",
318318
"coreApiSharePublicLink2",
319319
],
320-
"skip": True,
320+
"skip": False,
321321
"withRemotePhp": [False],
322322
},
323323
"4": {
@@ -329,7 +329,7 @@ config = {
329329
"coreApiShareCreateSpecialToShares2",
330330
"coreApiShareUpdateToShares",
331331
],
332-
"skip": True,
332+
"skip": False,
333333
"k8s": True,
334334
"withRemotePhp": [False],
335335
},
@@ -340,7 +340,7 @@ config = {
340340
"coreApiWebdavEtagPropagation1",
341341
"coreApiWebdavEtagPropagation2",
342342
],
343-
"skip": True,
343+
"skip": False,
344344
"k8s": True,
345345
},
346346
"6": {
@@ -349,13 +349,13 @@ config = {
349349
"coreApiWebdavOperations",
350350
"coreApiWebdavMove2",
351351
],
352-
"skip": True,
352+
"skip": False,
353353
},
354354
"7": {
355355
"suites": [
356356
"coreApiWebdavProperties",
357357
],
358-
"skip": True,
358+
"skip": False,
359359
"k8s": True,
360360
},
361361
"8": {
@@ -365,29 +365,29 @@ config = {
365365
"coreApiWebdavUpload",
366366
"coreApiWebdavUploadTUS",
367367
],
368-
"skip": True,
368+
"skip": False,
369369
},
370370
},
371371
"e2eTests": {
372372
"part": {
373-
"skip": True,
373+
"skip": False,
374374
"totalParts": 4, # divide and run all suites in parts (divide pipelines)
375375
"xsuites": ["search", "app-provider", "oidc", "ocm", "keycloak"], # suites to skip
376376
},
377377
"search": {
378-
"skip": True,
378+
"skip": False,
379379
"suites": ["search"], # suites to run
380380
"tikaNeeded": True,
381381
},
382382
"keycloak": {
383-
"skip": True,
383+
"skip": False,
384384
"suites": ["journeys", "keycloak"],
385385
"keycloakNeeded": True,
386386
},
387387
},
388388
"e2eMultiService": {
389389
"testSuites": {
390-
"skip": True,
390+
"skip": False,
391391
"suites": [
392392
"smoke",
393393
"shares",
@@ -1093,7 +1093,7 @@ def localApiTestPipeline(ctx):
10931093
params[item] = matrix[item] if item in matrix else defaults[item]
10941094
for storage in params["storages"]:
10951095
for run_with_remote_php in params["withRemotePhp"]:
1096-
run_on_k8s = params["k8s"]
1096+
run_on_k8s = params["k8s"] and ctx.build.event == "cron"
10971097
ocis_url = OCIS_URL
10981098
if run_on_k8s:
10991099
ocis_url = "https://%s" % OCIS_SERVER_NAME
@@ -1395,7 +1395,7 @@ def coreApiTestPipeline(ctx):
13951395
for run_with_remote_php in params["withRemotePhp"]:
13961396
filter_tags = "~@skipOnGraph&&~@skipOnOcis-%s-Storage" % ("OC" if storage == "owncloud" else "OCIS")
13971397
expected_failures_file = "%s/expected-failures-API-on-%s-storage.md" % (test_dir, storage.upper())
1398-
run_on_k8s = params["k8s"]
1398+
run_on_k8s = params["k8s"] and ctx.build.event == "cron"
13991399
ocis_url = OCIS_URL
14001400
if run_on_k8s:
14011401
ocis_url = "https://%s" % OCIS_SERVER_NAME
@@ -3827,7 +3827,7 @@ def prepareOcisDeployment():
38273827
"sed -i '/- name: IDM_ADMIN_PASSWORD/{n;N;N;N;d;}' ./charts/ocis/templates/idm/deployment.yaml",
38283828
"sed -i '/- name: IDM_ADMIN_PASSWORD/a\\\\\\n value: \"admin\"' ./charts/ocis/templates/idm/deployment.yaml",
38293829
"sed -i '/- name: PROXY_HTTP_ADDR/i\\\\ - name: PROXY_ENABLE_BASIC_AUTH\\\n value: \"true\"' ./charts/ocis/templates/proxy/deployment.yaml",
3830-
# Patch sharing deployment for banned password list (for @env-config tests)
3830+
# Patch sharing deployment for banned password list
38313831
"sed -i 's|/etc/ocis/sharing-banned-passwords.txt|/etc/ocis/config/drone/banned-password-list.txt|' ./charts/ocis/templates/sharing/deployment.yaml",
38323832
"sed -i 's|- name: configs|- name: banned-passwords|' ./charts/ocis/templates/sharing/deployment.yaml",
38333833
"sed -i 's|mountPath: /etc/ocis$|mountPath: /etc/ocis/config/drone|' ./charts/ocis/templates/sharing/deployment.yaml",

tests/acceptance/bootstrap/OcisConfigContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public function theAdministratorHasDisabledThePermissionsRole(string $role): voi
237237
public function theConfigHasBeenSetToPath(string $configVariable, string $path, ?string $serviceName = null): void {
238238
if (getenv("K8S") === "true") {
239239
// In K8s, use the path where the ConfigMap is mounted
240-
// The banned-password-list.txt is mounted at /etc/ocis/config/drone/
240+
// For example: The banned-password-list.txt is mounted at /etc/ocis/config/drone/
241241
$k8sPath = "/etc/ocis/" . $path;
242242
$envs = [
243243
$serviceName => [$configVariable => $k8sPath],

tests/acceptance/features/apiSharingNgLinkShareManagement/passwordPolicy.feature

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,12 @@ Feature: Password policy for public links password
1111

1212
Background:
1313
Given the following configs have been set:
14-
| service | config | value |
15-
| sharing | OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
16-
| sharing | OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
17-
| sharing | OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
18-
| sharing | OCIS_PASSWORD_POLICY_MIN_DIGITS | 2 |
19-
| sharing | OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
20-
| frontend | OCIS_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
21-
| frontend | OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
22-
| frontend | OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
23-
| frontend | OCIS_PASSWORD_POLICY_MIN_DIGITS | 2 |
24-
| frontend | OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
14+
| service | config | value |
15+
| sharing | SHARING_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
16+
| sharing | SHARING_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
17+
| sharing | SHARING_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
18+
| sharing | SHARING_PASSWORD_POLICY_MIN_DIGITS | 2 |
19+
| sharing | SHARING_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
2520
And user "Alice" has been created with default attributes
2621
And using SharingNG
2722

tests/acceptance/features/apiSharingNgLinkShareManagement/writableShareEnforcePassword.feature

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ Feature: enforce password on writable shares
77

88
Background:
99
Given the following configs have been set:
10-
| service | config | value |
11-
| sharing | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
12-
| sharing | OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true |
13-
| frontend | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
14-
| frontend | OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true |
10+
| service | config | value |
11+
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
12+
| sharing | SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true |
1513
And user "Alice" has been created with default attributes
1614
And using spaces DAV path
1715

0 commit comments

Comments
 (0)