Skip to content

Commit d242ccd

Browse files
owncloudersamrita-shrestha
authored andcommitted
create stale uploads
1 parent 1a0b642 commit d242ccd

File tree

11 files changed

+602
-564
lines changed

11 files changed

+602
-564
lines changed

.drone.star

+29-34
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ EMAIL_SMTP_SENDER = "ownCloud <[email protected]>"
7575
# configuration
7676
config = {
7777
"cs3ApiTests": {
78-
"skip": False,
78+
"skip": True,
7979
},
8080
"wopiValidatorTests": {
81-
"skip": False,
81+
"skip": True,
8282
},
8383
"k6LoadTests": {
84-
"skip": False,
84+
"skip": True,
8585
},
8686
"localApiTests": {
8787
"basic": {
@@ -95,14 +95,14 @@ config = {
9595
"apiLocks",
9696
"apiActivities",
9797
],
98-
"skip": False,
98+
"skip": True,
9999
},
100100
"settingsAndNotification": {
101101
"suites": [
102102
"apiSettings",
103103
"apiNotification",
104104
],
105-
"skip": False,
105+
"skip": True,
106106
"withRemotePhp": [True],
107107
"emailNeeded": True,
108108
"extraEnvironment": {
@@ -124,80 +124,80 @@ config = {
124124
"apiGraph",
125125
"apiGraphGroup",
126126
],
127-
"skip": False,
127+
"skip": True,
128128
"withRemotePhp": [True],
129129
},
130130
"graphUser": {
131131
"suites": [
132132
"apiGraphUser",
133133
],
134-
"skip": False,
134+
"skip": True,
135135
"withRemotePhp": [True],
136136
},
137137
"spaces": {
138138
"suites": [
139139
"apiSpaces",
140140
],
141-
"skip": False,
141+
"skip": True,
142142
},
143143
"spacesShares": {
144144
"suites": [
145145
"apiSpacesShares",
146146
],
147-
"skip": False,
147+
"skip": True,
148148
},
149149
"spacesDavOperation": {
150150
"suites": [
151151
"apiSpacesDavOperation",
152152
],
153-
"skip": False,
153+
"skip": True,
154154
},
155155
"search1": {
156156
"suites": [
157157
"apiSearch1",
158158
],
159-
"skip": False,
159+
"skip": True,
160160
},
161161
"search2": {
162162
"suites": [
163163
"apiSearch2",
164164
],
165-
"skip": False,
165+
"skip": True,
166166
},
167167
"sharingNg1": {
168168
"suites": [
169169
"apiSharingNgShares",
170170
"apiReshare",
171171
"apiSharingNgPermissions",
172172
],
173-
"skip": False,
173+
"skip": True,
174174
"withRemotePhp": [True],
175175
},
176176
"sharingNgAdditionalShareRole": {
177177
"suites": [
178178
"apiSharingNgAdditionalShareRole",
179179
],
180-
"skip": False,
180+
"skip": True,
181181
"withRemotePhp": [True],
182182
},
183183
"sharingNgShareInvitation": {
184184
"suites": [
185185
"apiSharingNgDriveInvitation",
186186
"apiSharingNgItemInvitation",
187187
],
188-
"skip": False,
188+
"skip": True,
189189
"withRemotePhp": [True],
190190
},
191191
"sharingNgLinkShare": {
192192
"suites": [
193193
"apiSharingNgDriveLinkShare",
194194
"apiSharingNgItemLinkShare",
195195
],
196-
"skip": False,
196+
"skip": True,
197197
"withRemotePhp": [True],
198198
},
199199
"accountsHashDifficulty": {
200-
"skip": False,
200+
"skip": True,
201201
"suites": [
202202
"apiAccountsHashDifficulty",
203203
],
@@ -207,7 +207,7 @@ config = {
207207
"suites": [
208208
"apiAntivirus",
209209
],
210-
"skip": False,
210+
"skip": True,
211211
"antivirusNeeded": True,
212212
"extraServerEnvironment": {
213213
"ANTIVIRUS_SCANNER_TYPE": "clamav",
@@ -222,14 +222,14 @@ config = {
222222
"suites": [
223223
"apiSearchContent",
224224
],
225-
"skip": False,
225+
"skip": True,
226226
"tikaNeeded": True,
227227
},
228228
"ocm": {
229229
"suites": [
230230
"apiOcm",
231231
],
232-
"skip": False,
232+
"skip": True,
233233
"withRemotePhp": [True],
234234
"federationServer": True,
235235
"emailNeeded": True,
@@ -255,7 +255,7 @@ config = {
255255
"suites": [
256256
"apiCollaboration",
257257
],
258-
"skip": False,
258+
"skip": True,
259259
"collaborationServiceNeeded": True,
260260
"extraServerEnvironment": {
261261
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
@@ -265,7 +265,7 @@ config = {
265265
"suites": [
266266
"apiAuthApp",
267267
],
268-
"skip": False,
268+
"skip": True,
269269
"withRemotePhp": [True],
270270
"extraServerEnvironment": {
271271
"OCIS_ADD_RUN_SERVICES": "auth-app",
@@ -299,24 +299,24 @@ config = {
299299
},
300300
"apiTests": {
301301
"numberOfParts": 7,
302-
"skip": False,
302+
"skip": True,
303303
"skipExceptParts": [],
304304
},
305305
"e2eTests": {
306306
"part": {
307-
"skip": False,
307+
"skip": True,
308308
"totalParts": 4, # divide and run all suites in parts (divide pipelines)
309309
"xsuites": ["search", "app-provider", "oidc", "ocm"], # suites to skip
310310
},
311311
"search": {
312-
"skip": False,
312+
"skip": True,
313313
"suites": ["search"], # suites to run
314314
"tikaNeeded": True,
315315
},
316316
},
317317
"e2eMultiService": {
318318
"testSuites": {
319-
"skip": False,
319+
"skip": True,
320320
"suites": [
321321
"smoke",
322322
"shares",
@@ -430,14 +430,9 @@ def main(ctx):
430430
licenseCheck(ctx)
431431

432432
test_pipelines = \
433-
codestyle(ctx) + \
434-
checkGherkinLint(ctx) + \
435-
checkTestSuitesInExpectedFailures(ctx) + \
436433
buildWebCache(ctx) + \
437434
getGoBinForTesting(ctx) + \
438435
buildOcisBinaryForTesting(ctx) + \
439-
checkStarlark() + \
440-
build_release_helpers + \
441436
testOcisAndUploadResults(ctx) + \
442437
testPipelines(ctx)
443438

@@ -1002,7 +997,7 @@ def localApiTestPipeline(ctx):
1002997

1003998
defaults = {
1004999
"suites": {},
1005-
"skip": False,
1000+
"skip": True,
10061001
"extraEnvironment": {},
10071002
"extraServerEnvironment": {},
10081003
"storages": ["ocis"],
@@ -1357,7 +1352,7 @@ def apiTests(ctx):
13571352

13581353
def e2eTestPipeline(ctx):
13591354
defaults = {
1360-
"skip": False,
1355+
"skip": True,
13611356
"suites": [],
13621357
"xsuites": [],
13631358
"totalParts": 0,
@@ -1475,7 +1470,7 @@ def multiServiceE2ePipeline(ctx):
14751470
pipelines = []
14761471

14771472
defaults = {
1478-
"skip": False,
1473+
"skip": True,
14791474
"suites": [],
14801475
"xsuites": [],
14811476
"tikaNeeded": False,

services/graph/pkg/l10n/locale/uk/LC_MESSAGES/graph.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: \n"
1313
"Report-Msgid-Bugs-To: EMAIL\n"
14-
"POT-Creation-Date: 2025-04-05 00:51+0000\n"
14+
"POT-Creation-Date: 2025-04-26 00:37+0000\n"
1515
"PO-Revision-Date: 2024-04-04 00:17+0000\n"
1616
"Last-Translator: Roman Perekhod, 2025\n"
1717
"Language-Team: Ukrainian (https://app.transifex.com/owncloud-org/teams/6149/uk/)\n"

tests/acceptance/bootstrap/CliContext.php

+37
Original file line numberDiff line numberDiff line change
@@ -496,4 +496,41 @@ public function theAdministratorTriggersEmailNotificationsUsingTheCLI(string $in
496496

497497
$this->featureContext->setResponse(CliHelper::runCommand($body));
498498
}
499+
500+
/**
501+
* @When the administrator has created stale upload
502+
*
503+
* @return void
504+
*/
505+
public function theAdministratorHasCreated(): void {
506+
// $folderPath = "/home/amrita/.ocis/storage/users/uploads";
507+
$path = $this->featureContext->getStorageUsersRoot();
508+
var_dump($path);
509+
$items = scandir($path);
510+
foreach ($items as $item) {
511+
if ($item === '.' || $item === '..') {
512+
continue; // Skip current and parent directory references
513+
}
514+
515+
$fullPath = $path . '/' . $item;
516+
517+
if (is_file($fullPath)) {
518+
echo "File: $item\n";
519+
} elseif (is_dir($fullPath)) {
520+
echo "Folder: $item\n";
521+
}
522+
}
523+
$folderPath = $path . "/uploads";
524+
$infoFiles = glob($folderPath . '/*.info');
525+
var_dump($infoFiles);
526+
foreach ($infoFiles as $file) {
527+
if (is_file($file)) {
528+
if (unlink($file)) {
529+
echo "Deleted: $file\n";
530+
} else {
531+
echo "Failed to delete: $file\n";
532+
}
533+
}
534+
}
535+
}
499536
}
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
@env-config
2-
Feature: create auth-app token
3-
As an admin
4-
I want to create auth-app Tokens
5-
So that I can use 3rd party apps
6-
7-
Background:
8-
Given user "Alice" has been created with default attributes
9-
And the following configs have been set:
10-
| config | value |
11-
| OCIS_ADD_RUN_SERVICES | auth-app |
12-
| PROXY_ENABLE_APP_AUTH | true |
13-
14-
15-
Scenario: creates auth-app token via CLI
16-
When the administrator creates auth-app token for user "Alice" with expiration time "72h" using the auth-app CLI
17-
Then the command should be successful
18-
And the command output should contain "App token created for Alice"
19-
20-
21-
Scenario: user deletes the created auth-app token
22-
Given the config "AUTH_APP_ENABLE_IMPERSONATION" has been set to "true"
23-
And the administrator has created app token for user "Alice" with expiration time "72h" using the auth-app CLI
24-
When user "Alice" deletes all the created auth-app tokens using the auth-app API
25-
Then the HTTP status code should be "200"
26-
And user "Admin" should have "0" auth-app tokens
27-
When user "Admin" lists all created tokens using the auth-app API
28-
Then the HTTP status code should be "200"
29-
And the JSON data of the response should match
30-
"""
31-
{
32-
"type": "array",
33-
"minItems": 0,
34-
"maxItems": 0
35-
}
36-
"""
37-
38-
39-
Scenario: try to create auth-app token without expiry
40-
When the administrator tries to create auth-app token for user "Alice" with expiration time "" using the auth-app CLI
41-
Then the command should be unsuccessful
42-
And the command output should contain "time: invalid duration"
1+
#@env-config
2+
#Feature: create auth-app token
3+
# As an admin
4+
# I want to create auth-app Tokens
5+
# So that I can use 3rd party apps
6+
#
7+
# Background:
8+
# Given user "Alice" has been created with default attributes
9+
# And the following configs have been set:
10+
# | config | value |
11+
# | OCIS_ADD_RUN_SERVICES | auth-app |
12+
# | PROXY_ENABLE_APP_AUTH | true |
13+
#
14+
#
15+
# Scenario: creates auth-app token via CLI
16+
# When the administrator creates auth-app token for user "Alice" with expiration time "72h" using the auth-app CLI
17+
# Then the command should be successful
18+
# And the command output should contain "App token created for Alice"
19+
#
20+
#
21+
# Scenario: user deletes the created auth-app token
22+
# Given the config "AUTH_APP_ENABLE_IMPERSONATION" has been set to "true"
23+
# And the administrator has created app token for user "Alice" with expiration time "72h" using the auth-app CLI
24+
# When user "Alice" deletes all the created auth-app tokens using the auth-app API
25+
# Then the HTTP status code should be "200"
26+
# And user "Admin" should have "0" auth-app tokens
27+
# When user "Admin" lists all created tokens using the auth-app API
28+
# Then the HTTP status code should be "200"
29+
# And the JSON data of the response should match
30+
# """
31+
# {
32+
# "type": "array",
33+
# "minItems": 0,
34+
# "maxItems": 0
35+
# }
36+
# """
37+
#
38+
#
39+
# Scenario: try to create auth-app token without expiry
40+
# When the administrator tries to create auth-app token for user "Alice" with expiration time "" using the auth-app CLI
41+
# Then the command should be unsuccessful
42+
# And the command output should contain "time: invalid duration"

0 commit comments

Comments
 (0)