Skip to content

Commit 9ebedfb

Browse files
committed
test: cleanup
1 parent 3d48425 commit 9ebedfb

File tree

2 files changed

+265
-8
lines changed

2 files changed

+265
-8
lines changed

.drone.star

Lines changed: 264 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,275 @@ config = {
9393
"skip": False,
9494
},
9595
"localApiTests": {
96+
"contractAndLock": {
97+
"suites": [
98+
"apiContract",
99+
"apiLocks",
100+
],
101+
"skip": False,
102+
"k8s": True,
103+
},
104+
"settingsAndNotification": {
105+
"suites": [
106+
"apiSettings",
107+
"apiNotification",
108+
"apiCors",
109+
],
110+
"skip": False,
111+
"withRemotePhp": [True],
112+
"emailNeeded": True,
113+
"extraEnvironment": {
114+
"EMAIL_HOST": EMAIL_SMTP_HOST,
115+
"EMAIL_PORT": EMAIL_PORT,
116+
},
117+
"extraServerEnvironment": {
118+
"OCIS_ADD_RUN_SERVICES": "notifications",
119+
"NOTIFICATIONS_SMTP_HOST": EMAIL_SMTP_HOST,
120+
"NOTIFICATIONS_SMTP_PORT": EMAIL_SMTP_PORT,
121+
"NOTIFICATIONS_SMTP_INSECURE": "true",
122+
"NOTIFICATIONS_SMTP_SENDER": EMAIL_SMTP_SENDER,
123+
"NOTIFICATIONS_DEBUG_ADDR": "0.0.0.0:9174",
124+
},
125+
},
126+
"graphUser": {
127+
"suites": [
128+
"apiGraphUser",
129+
],
130+
"skip": False,
131+
"withRemotePhp": [True],
132+
},
96133
"spaces": {
97134
"suites": [
98135
"apiSpaces",
99136
],
100137
"skip": False,
101138
"k8s": True,
102139
},
140+
"spacesShares": {
141+
"suites": [
142+
"apiSpacesShares",
143+
],
144+
"skip": False,
145+
"k8s": True,
146+
},
147+
"davOperations": {
148+
"suites": [
149+
"apiSpacesDavOperation",
150+
"apiDownloads",
151+
"apiAsyncUpload",
152+
"apiDepthInfinity",
153+
"apiArchiver",
154+
"apiActivities",
155+
],
156+
"skip": False,
157+
},
158+
"groupAndSearch1": {
159+
"suites": [
160+
"apiSearch1",
161+
"apiGraph",
162+
"apiGraphGroup",
163+
"apiServiceAvailability",
164+
],
165+
"skip": False,
166+
"k8s": False,
167+
},
168+
"search2": {
169+
"suites": [
170+
"apiSearch2",
171+
"apiSearchContent",
172+
],
173+
"tikaNeeded": True,
174+
"skip": False,
175+
"k8s": False,
176+
},
177+
"sharingNg1": {
178+
"suites": [
179+
"apiSharingNgShares",
180+
"apiReshare",
181+
"apiSharingNgPermissions",
182+
],
183+
"skip": False,
184+
"withRemotePhp": [True],
185+
},
186+
"sharingNgAdditionalShareRole": {
187+
"suites": [
188+
"apiSharingNgAdditionalShareRole",
189+
],
190+
"skip": False,
191+
"k8s": True,
192+
"withRemotePhp": [True],
193+
},
194+
"sharingNgShareInvitation": {
195+
"suites": [
196+
"apiSharingNgDriveInvitation",
197+
"apiSharingNgItemInvitation",
198+
],
199+
"skip": False,
200+
"withRemotePhp": [True],
201+
},
202+
"sharingNgLinkShare": {
203+
"suites": [
204+
"apiSharingNgDriveLinkShare",
205+
"apiSharingNgItemLinkShare",
206+
"apiSharingNgLinkShareManagement",
207+
],
208+
"skip": False,
209+
"withRemotePhp": [True],
210+
},
211+
"antivirus": {
212+
"suites": [
213+
"apiAntivirus",
214+
],
215+
"skip": False,
216+
"antivirusNeeded": True,
217+
"extraServerEnvironment": {
218+
"ANTIVIRUS_SCANNER_TYPE": "clamav",
219+
"ANTIVIRUS_CLAMAV_SOCKET": "tcp://clamav:3310",
220+
"POSTPROCESSING_STEPS": "virusscan",
221+
"OCIS_ADD_RUN_SERVICES": "antivirus",
222+
"ANTIVIRUS_DEBUG_ADDR": "0.0.0.0:9297",
223+
},
224+
},
225+
"ocmAndAuthApp": {
226+
"suites": [
227+
"apiOcm",
228+
"apiAuthApp",
229+
],
230+
"skip": False,
231+
"withRemotePhp": [True],
232+
"federationServer": True,
233+
"emailNeeded": True,
234+
"extraEnvironment": {
235+
"EMAIL_HOST": EMAIL_SMTP_HOST,
236+
"EMAIL_PORT": EMAIL_PORT,
237+
},
238+
"extraServerEnvironment": {
239+
"OCIS_ADD_RUN_SERVICES": "ocm,notifications,auth-app",
240+
"OCIS_ENABLE_OCM": True,
241+
"OCM_OCM_INVITE_MANAGER_INSECURE": True,
242+
"OCM_OCM_SHARE_PROVIDER_INSECURE": True,
243+
"OCM_OCM_STORAGE_PROVIDER_INSECURE": True,
244+
"OCM_OCM_PROVIDER_AUTHORIZER_PROVIDERS_FILE": "%s" % dirs["ocmProviders"],
245+
# mail notifications
246+
"NOTIFICATIONS_SMTP_HOST": EMAIL_SMTP_HOST,
247+
"NOTIFICATIONS_SMTP_PORT": EMAIL_SMTP_PORT,
248+
"NOTIFICATIONS_SMTP_INSECURE": "true",
249+
"NOTIFICATIONS_SMTP_SENDER": EMAIL_SMTP_SENDER,
250+
# auth-app
251+
"PROXY_ENABLE_APP_AUTH": True,
252+
},
253+
},
254+
"wopi": {
255+
"suites": [
256+
"apiCollaboration",
257+
],
258+
"skip": False,
259+
"withRemotePhp": [True],
260+
"collaborationServiceNeeded": True,
261+
"extraServerEnvironment": {
262+
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
263+
},
264+
},
265+
"cliCommands": {
266+
"suites": [
267+
"cliCommands",
268+
],
269+
"skip": False,
270+
"withRemotePhp": [True],
271+
"antivirusNeeded": True,
272+
"emailNeeded": True,
273+
"extraEnvironment": {
274+
"EMAIL_HOST": EMAIL_SMTP_HOST,
275+
"EMAIL_PORT": EMAIL_PORT,
276+
},
277+
"extraServerEnvironment": {
278+
"NOTIFICATIONS_SMTP_HOST": EMAIL_SMTP_HOST,
279+
"NOTIFICATIONS_SMTP_PORT": EMAIL_SMTP_PORT,
280+
"NOTIFICATIONS_SMTP_INSECURE": "true",
281+
"NOTIFICATIONS_SMTP_SENDER": EMAIL_SMTP_SENDER,
282+
"NOTIFICATIONS_DEBUG_ADDR": "0.0.0.0:9174",
283+
"ANTIVIRUS_SCANNER_TYPE": "clamav",
284+
"ANTIVIRUS_CLAMAV_SOCKET": "tcp://clamav:3310",
285+
"OCIS_ADD_RUN_SERVICES": "antivirus,notifications",
286+
},
287+
},
288+
},
289+
"coreApiTests": {
290+
"1": {
291+
"suites": [
292+
"coreApiAuth",
293+
"coreApiCapabilities",
294+
"coreApiFavorites",
295+
"coreApiMain",
296+
"coreApiVersions",
297+
],
298+
"skip": False,
299+
"withRemotePhp": [True],
300+
},
301+
"2": {
302+
"suites": [
303+
"coreApiShareManagementBasicToShares",
304+
"coreApiShareManagementToShares",
305+
],
306+
"skip": False,
307+
"k8s": True,
308+
"withRemotePhp": [True],
309+
},
310+
"3": {
311+
"suites": [
312+
"coreApiSharees",
313+
"coreApiSharePublicLink2",
314+
],
315+
"skip": False,
316+
"withRemotePhp": [True],
317+
},
318+
"4": {
319+
"suites": [
320+
"coreApiShareOperationsToShares1",
321+
"coreApiShareOperationsToShares2",
322+
"coreApiSharePublicLink1",
323+
"coreApiShareCreateSpecialToShares1",
324+
"coreApiShareCreateSpecialToShares2",
325+
"coreApiShareUpdateToShares",
326+
],
327+
"skip": False,
328+
"k8s": True,
329+
"withRemotePhp": [True],
330+
},
331+
"5": {
332+
"suites": [
333+
"coreApiTrashbin",
334+
"coreApiTrashbinRestore",
335+
"coreApiWebdavEtagPropagation1",
336+
"coreApiWebdavEtagPropagation2",
337+
],
338+
"skip": False,
339+
"k8s": True,
340+
},
341+
"6": {
342+
"suites": [
343+
"coreApiWebdavDelete",
344+
"coreApiWebdavOperations",
345+
"coreApiWebdavMove2",
346+
],
347+
"skip": False,
348+
},
349+
"7": {
350+
"suites": [
351+
"coreApiWebdavProperties",
352+
],
353+
"skip": False,
354+
"k8s": True,
355+
},
356+
"8": {
357+
"suites": [
358+
"coreApiWebdavMove1",
359+
"coreApiWebdavPreviews",
360+
"coreApiWebdavUpload",
361+
"coreApiWebdavUploadTUS",
362+
],
363+
"skip": False,
364+
},
103365
},
104366
"e2eTests": {
105367
"part": {
@@ -826,7 +1088,7 @@ def localApiTestPipeline(ctx):
8261088
params[item] = matrix[item] if item in matrix else defaults[item]
8271089
for storage in params["storages"]:
8281090
for run_with_remote_php in params["withRemotePhp"]:
829-
run_on_k8s = params["k8s"]
1091+
run_on_k8s = params["k8s"] and ctx.build.event == "cron"
8301092
ocis_url = OCIS_URL
8311093
if run_on_k8s:
8321094
ocis_url = "https://%s" % OCIS_SERVER_NAME
@@ -1128,7 +1390,7 @@ def coreApiTestPipeline(ctx):
11281390
for run_with_remote_php in params["withRemotePhp"]:
11291391
filter_tags = "~@skipOnGraph&&~@skipOnOcis-%s-Storage" % ("OC" if storage == "owncloud" else "OCIS")
11301392
expected_failures_file = "%s/expected-failures-API-on-%s-storage.md" % (test_dir, storage.upper())
1131-
run_on_k8s = params["k8s"]
1393+
run_on_k8s = params["k8s"] and ctx.build.event == "cron"
11321394
ocis_url = OCIS_URL
11331395
if run_on_k8s:
11341396
ocis_url = "https://%s" % OCIS_SERVER_NAME
@@ -3554,7 +3816,6 @@ def deployOcis():
35543816
"commands": [
35553817
"make -C %s build" % dirs["ocisWrapper"],
35563818
"mv %s/tests/config/drone/k3s/values.yaml %s/ocis-charts/charts/ocis/ci/deployment-values.yaml" % (dirs["base"], dirs["base"]),
3557-
"cat %s/ocis-charts/charts/ocis/ci/deployment-values.yaml" % dirs["base"],
35583819
"cp -r %s/tests/config/drone/k3s/authbasic %s/ocis-charts/charts/ocis/templates/" % (dirs["base"], dirs["base"]),
35593820
"cd %s/ocis-charts" % dirs["base"],
35603821
"sed -i '/{{- define \"ocis.basicServiceTemplates\" -}}/a\\\\ {{- $_ := set .scope \"appNameAuthBasic\" \"authbasic\" -}}' ./charts/ocis/templates/_common/_tplvalues.tpl",
@@ -3565,7 +3826,6 @@ def deployOcis():
35653826
"sed -i '/name: SHARING_PASSWORD_POLICY_BANNED_PASSWORDS_LIST/,+1d' %s/ocis-charts/charts/ocis/templates/sharing/deployment.yaml" % dirs["base"],
35663827
"export KUBECONFIG=%s/kubeconfig-$${DRONE_BUILD_NUMBER}.yaml" % dirs["base"],
35673828
"make helm-install-atomic",
3568-
"curl -kv -X 'POST' 'https://ocis-server/graph/v1.0/drives' -H 'Authorization: Basic YWRtaW46YWRtaW4=' -d '{\"name\":\"Space Nameklkj\"}'",
35693829
],
35703830
"volumes": [
35713831
{
@@ -3585,8 +3845,6 @@ def ociswrapper():
35853845
"until test -f $${KUBECONFIG}; do sleep 1s; done",
35863846
"kubectl get pods -A",
35873847
"kubectl get ingress -A",
3588-
"POD_NAME=$(kubectl get pods -n ocis --no-headers | grep graph | awk '{print $1}')",
3589-
"kubectl describe pod $POD_NAME -n ocis",
35903848
"%s/bin/ociswrapper serve --url https://ocis-server --admin-username admin --admin-password admin --skip-ocis-run" % dirs["ocisWrapper"],
35913849
],
35923850
"detach": True,

tests/acceptance/bootstrap/SpacesContext.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,15 +653,14 @@ public function listAllMySpaces(
653653
string $query = '',
654654
array $headers = [],
655655
): ResponseInterface {
656-
$response = GraphHelper::getMySpaces(
656+
return GraphHelper::getMySpaces(
657657
$this->featureContext->getBaseUrl(),
658658
$user,
659659
$this->featureContext->getPasswordForUser($user),
660660
$query,
661661
[],
662662
$headers,
663663
);
664-
return $response;
665664
}
666665

667666
/**

0 commit comments

Comments
 (0)