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
+53-24Lines changed: 53 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -247,56 +247,85 @@ 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
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"
250
+
Scenario: resume all failed upload but not for finished using postprocessing command
251
+
Given the following configs have been set:
252
+
| config | value |
253
+
| POSTPROCESSING_STEPS | virusscan,delay |
254
+
| ANTIVIRUS_INFECTED_FILE_HANDLING | abort |
255
+
| POSTPROCESSING_DELAY | 10s |
256
+
And user "Alice" has created a new TUS resource in the space "Personal" with the following headers:
257
+
| Upload-Length | 10 |
258
+
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
259
+
| Upload-Metadata | filenamedGV4dEZpbGUudHh0 |
260
+
| Tus-Resumable | 1.0.0 |
261
+
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
262
+
And user "Alice" has uploaded file with content "uploaded content" to "file.txt"
254
263
And the administrator has waited for "1" seconds
255
264
And the administrator has stopped the server
256
265
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
266
When the administrator resumes all uploads session using post processing command
261
267
Then the command should be successful
262
268
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"
269
+
And the content of file "file.txt" for user "Alice" should be "uploaded content"
270
+
And the administrator lists all the upload sessions
271
+
Then the command should be successful
272
+
And the CLI response should contain these entries:
273
+
| textFile.txt |
274
+
And the CLI response should not contain these entries:
275
+
| file.txt |
265
276
266
277
267
278
Scenario: resume all failed upload on finished step using postprocessing command
268
-
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"
279
+
Given the following configs have been set:
280
+
| config | value |
281
+
| POSTPROCESSING_STEPS | virusscan,delay |
282
+
| ANTIVIRUS_INFECTED_FILE_HANDLING | abort |
283
+
| POSTPROCESSING_DELAY | 10s |
284
+
And user "Alice" has created a new TUS resource in the space "Personal" with the following headers:
285
+
| Upload-Length | 10 |
286
+
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
287
+
| Upload-Metadata | filenamedGV4dEZpbGUudHh0 |
288
+
| Tus-Resumable | 1.0.0 |
289
+
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
290
+
And user "Alice" has uploaded file with content "uploaded content" to "file.txt"
271
291
And the administrator has waited for "1" seconds
272
292
And the administrator has stopped the server
273
293
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
294
When the administrator resumes all uploads session in finished step using post processing command
278
295
Then the command should be successful
279
296
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"
297
+
And the content of file "file.txt" for user "Alice" should be "uploaded content"
298
+
And the administrator lists all the upload sessions
299
+
Then the command should be successful
300
+
And the CLI response should contain these entries:
301
+
| textFile.txt |
302
+
And the CLI response should not contain these entries:
303
+
| file.txt |
282
304
283
305
284
306
# Scenario: resume all failed upload on virus scan step using postprocessing command
285
307
# Given the following configs have been set:
286
308
# | config | value |
287
-
# | POSTPROCESSING_STEPS | virusscan |
288
-
# | ANTIVIRUS_INFECTED_FILE_HANDLING | abort |
289
-
# | POSTPROCESSING_DELAY | 10s |
309
+
# | POSTPROCESSING_STEPS | virusscan,delay |
310
+
# | ANTIVIRUS_INFECTED_FILE_HANDLING | continue |
311
+
# | POSTPROCESSING_DELAY | 3s |
312
+
# And user "Alice" has uploaded file "filesForUpload/filesWithVirus/eicar.com" to "/virusFile.txt"
290
313
# 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
314
# And the administrator has waited for "1" seconds
293
315
# And the administrator has stopped the server
294
316
# And the administrator has started the server
295
317
# 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
318
+
# And the administrator lists all the upload sessions with flag "has-virus"
319
+
# Then the command should be successful
320
+
# And the CLI response should contain these entries:
321
+
# | virusFile.txt |
322
+
# And the CLI response should not contain these entries:
323
+
# | file1.txt |
298
324
# When the administrator resumes all uploads session in virusscan step using post processing command
299
325
# Then the command should be successful
326
+
# And the content of file "file1.txt" for user "Alice" should be "uploaded content"
327
+
# Then for user "Alice" file "file1.txt" of space "Personal" should be in postprocessing
328
+
300
329
# When the administrator waits for "3" seconds
330
+
# And the content of file "eicar.com" for user "Alice" should be "uploaded content"
301
331
# 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"
0 commit comments