You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/acceptance/features/cliCommands/uploadSessions.feature
+87-38Lines changed: 87 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -247,56 +247,105 @@ Feature: List upload sessions via CLI command
247
247
And the content of file "file1.txt" for user "Alice" should be "uploaded content"
248
248
249
249
250
-
Scenario: resume all failed upload using postprocessing command
250
+
Scenario: resume all failed upload but not for unfinished upload using postprocessing command
251
251
Given the config "POSTPROCESSING_DELAY" has been set to "3s"
252
-
And user "Alice" has uploaded file with content "uploaded content" to "file1.txt"
253
-
And user "Alice" has uploaded file with content "uploaded content" to "file2.txt"
252
+
And user "Alice" has created a new TUS resource in the space "Personal" with the following headers:
253
+
| Upload-Length | 10 |
254
+
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
255
+
| Upload-Metadata | filenamedGV4dEZpbGUudHh0 |
256
+
| Tus-Resumable | 1.0.0 |
257
+
And user "Alice" has uploaded file with checksum "SHA1 8cb2237d0679ca88db6464eac60da96345513964" to the last created TUS Location with offset "0" and content "12345" via TUS inside of the space "Personal" using the WebDAV API
258
+
And user "Alice" has uploaded file with content "uploaded content" to "file.txt"
254
259
And the administrator has waited for "1" seconds
255
260
And the administrator has stopped the server
256
261
And the administrator has started the server
257
-
When the administrator waits for "3" seconds
258
-
Then for user "Alice" file "file1.txt" of space "Personal" should be in postprocessing
259
-
And for user "Alice" file "file2.txt" of space "Personal" should be in postprocessing
260
-
When the administrator resumes all uploads session using post processing command
262
+
When the administrator resumes all the uploads session using the post processing command
261
263
Then the command should be successful
262
264
When the administrator waits for "3" seconds
263
-
And the content of file "file1.txt" for user "Alice" should be "uploaded content"
264
-
And the content of file "file2.txt" for user "Alice" should be "uploaded content"
265
+
Then the content of file "file.txt" for user "Alice" should be "uploaded content"
266
+
When the administrator lists all the upload sessions
267
+
Then the command should be successful
268
+
And the CLI response should contain these entries:
269
+
| textFile.txt |
270
+
And the CLI response should not contain these entries:
271
+
| file.txt |
265
272
266
273
267
-
Scenario: resume all failed upload on finished step using postprocessing command
274
+
Scenario: resume all failed upload on finished step but not for unfinished upload using postprocessing command
268
275
Given the config "POSTPROCESSING_DELAY" has been set to "3s"
269
-
And user "Alice" has uploaded file with content "uploaded content" to "file1.txt"
270
-
And user "Alice" has uploaded file with content "uploaded content" to "file2.txt"
276
+
And user "Alice" has created a new TUS resource in the space "Personal" with the following headers:
277
+
| Upload-Length | 10 |
278
+
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
279
+
| Upload-Metadata | filenamedGV4dEZpbGUudHh0 |
280
+
| Tus-Resumable | 1.0.0 |
281
+
And user "Alice" has uploaded file with checksum "SHA1 8cb2237d0679ca88db6464eac60da96345513964" to the last created TUS Location with offset "0" and content "12345" via TUS inside of the space "Personal" using the WebDAV API
282
+
And user "Alice" has uploaded file with content "uploaded content" to "file.txt"
271
283
And the administrator has waited for "1" seconds
272
284
And the administrator has stopped the server
273
285
And the administrator has started the server
274
-
When the administrator waits for "3" seconds
275
-
Then for user "Alice" file "file1.txt" of space "Personal" should be in postprocessing
276
-
And for user "Alice" file "file2.txt" of space "Personal" should be in postprocessing
277
286
When the administrator resumes all uploads session in finished step using post processing command
278
287
Then the command should be successful
279
288
When the administrator waits for "3" seconds
280
-
And the content of file "file1.txt" for user "Alice" should be "uploaded content"
281
-
And the content of file "file2.txt" for user "Alice" should be "uploaded content"
282
-
283
-
284
-
# Scenario: resume all failed upload on virus scan step using postprocessing command
285
-
# Given the following configs have been set:
286
-
# | config | value |
287
-
# | POSTPROCESSING_STEPS | virusscan |
288
-
# | ANTIVIRUS_INFECTED_FILE_HANDLING | abort |
289
-
# | POSTPROCESSING_DELAY | 10s |
290
-
# And user "Alice" has uploaded file with content "uploaded content" to "file1.txt"
291
-
# And user "Alice" has uploaded file with content "uploaded content" to "file2.txt"
292
-
# And the administrator has waited for "1" seconds
293
-
# And the administrator has stopped the server
294
-
# And the administrator has started the server
295
-
# When the administrator waits for "3" seconds
296
-
# Then for user "Alice" file "file1.txt" of space "Personal" should be in postprocessing
297
-
# And for user "Alice" file "file2.txt" of space "Personal" should be in postprocessing
298
-
# When the administrator resumes all uploads session in virusscan step using post processing command
299
-
# Then the command should be successful
300
-
# When the administrator waits for "3" seconds
301
-
# And the content of file "file1.txt" for user "Alice" should be "uploaded content"
302
-
# And the content of file "file2.txt" for user "Alice" should be "uploaded content"
289
+
Then the content of file "file.txt" for user "Alice" should be "uploaded content"
290
+
When the administrator lists all the upload sessions
291
+
Then the command should be successful
292
+
And the CLI response should contain these entries:
293
+
| textFile.txt |
294
+
And the CLI response should not contain these entries:
295
+
| file.txt |
296
+
297
+
298
+
Scenario: resume all failed upload on virus scan steps but not for unfinished upload step using postprocessing command
299
+
Given the following configs have been set:
300
+
| config | value |
301
+
| POSTPROCESSING_STEPS | delay,virusscan |
302
+
| ANTIVIRUS_INFECTED_FILE_HANDLING | abort |
303
+
| POSTPROCESSING_DELAY | 10s |
304
+
And user "Alice" has created a new TUS resource in the space "Personal" with the following headers:
305
+
| Upload-Length | 10 |
306
+
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
307
+
| Upload-Metadata | filenamedGV4dEZpbGUudHh0 |
308
+
| Tus-Resumable | 1.0.0 |
309
+
And user "Alice" has uploaded file with checksum "SHA1 8cb2237d0679ca88db6464eac60da96345513964" to the last created TUS Location with offset "0" and content "12345" via TUS inside of the space "Personal" using the WebDAV API
310
+
And user "Alice" has uploaded file "filesForUpload/filesWithVirus/eicar.com" to "/virusFile.txt"
311
+
And user "Alice" has uploaded file with content "uploaded content" to "file.txt"
312
+
And the administrator has waited for "1" seconds
313
+
And the administrator has stopped the server
314
+
And the administrator has started the server
315
+
When the administrator resumes all uploads session in virusscan step using post processing command
316
+
Then the command should be successful
317
+
When the administrator waits for "3" seconds
318
+
Then the content of file "file.txt" for user "Alice" should be "uploaded content"
319
+
When the administrator lists all the upload sessions
320
+
Then the command should be successful
321
+
And the CLI response should contain these entries:
322
+
| textFile.txt |
323
+
| virusFile.txt |
324
+
And the CLI response should not contain these entries:
325
+
| file.txt |
326
+
327
+
328
+
Scenario: resume virus file upload failed on virus scan step using postprocessing command
329
+
Given the following configs have been set:
330
+
| config | value |
331
+
| POSTPROCESSING_STEPS | delay,virusscan |
332
+
| ANTIVIRUS_INFECTED_FILE_HANDLING | continue |
333
+
| POSTPROCESSING_DELAY | 10s |
334
+
And user "Alice" has uploaded file "filesForUpload/filesWithVirus/eicar.com" to "/virusFile.txt"
335
+
And the administrator has waited for "1" seconds
336
+
And the administrator has stopped the server
337
+
And the administrator has started the server
338
+
When the administrator waits for "3" seconds
339
+
Then for user "Alice" file "virusFile.txt" of space "Personal" should be in postprocessing
340
+
When the administrator lists all the upload sessions
341
+
Then the command should be successful
342
+
And the CLI response should contain these entries:
343
+
| virusFile.txt |
344
+
When the administrator resumes all uploads session in virusscan step using post processing command
345
+
Then the command should be successful
346
+
When the administrator waits for "3" seconds
347
+
Then as "Alice" file "/virusFile.txt" should exist
348
+
When the administrator lists all the upload sessions
349
+
Then the command should be successful
350
+
And the CLI response should not contain these entries:
0 commit comments