Skip to content

[QA][CLI] Add cli tests coverage for post processing service #11273

@amrita-shrestha

Description

@amrita-shrestha

Description

Add tests coverage for managing unfinished uploads using postprocessing service

Using postprocessing service

# list upload sessions
> ./ocis/bin/ocis storage-users uploads sessions                               
Sessions:
+--------------------------------------+--------------------------------------+--------------------------------+--------+--------+--------------------------------------+--------------------------------------+---------------------------+------------+----------------------+-------------+
|                Space                 |              Upload Id               |              Name              | Offset |  Size  |              Executant               |                Owner                 |          Expires          | Processing |      Scan Date       | Scan Result |
+--------------------------------------+--------------------------------------+--------------------------------+--------+--------+--------------------------------------+--------------------------------------+---------------------------+------------+----------------------+-------------+
| 7f2afb67-021a-4553-b711-7c91d294bcac | 42287076-699c-4857-8466-d6ee2b4cf531 | Screenshot from 2025-01-29     | 133251 | 133251 | 7f2afb67-021a-4553-b711-7c91d294bcac | 7f2afb67-021a-4553-b711-7c91d294bcac | 2025-04-29T12:23:11+05:45 | true       | 0001-01-01T00:00:00Z |             |
|                                      |                                      | 16-32-54.png                   |        |        |                                      |                                      |                           |            |                      |             |
| 7f2afb67-021a-4553-b711-7c91d294bcac | 804767f0-3a24-4c23-8e76-922aa731978e | Screenshot from 2025-02-05     |  38000 |  38000 | 7f2afb67-021a-4553-b711-7c91d294bcac | 7f2afb67-021a-4553-b711-7c91d294bcac | 2025-04-29T12:23:11+05:45 | true       | 0001-01-01T00:00:00Z |             |
|                                      |                                      | 13-01-43.png                   |        |        |                                      |                                      |                           |            |                      |             |
| 7f2afb67-021a-4553-b711-7c91d294bcac | b25c1983-cc0b-4281-93bb-b8ccc772a478 | Screenshot from 2025-01-17     | 226645 | 226645 | 7f2afb67-021a-4553-b711-7c91d294bcac | 7f2afb67-021a-4553-b711-7c91d294bcac | 2025-04-29T12:23:11+05:45 | true       | 0001-01-01T00:00:00Z |             |
|                                      |                                      | 11-42-49.png                   |        |        |                                      |                                      |                           |            |                      |             |
+--------------------------------------+--------------------------------------+--------------------------------+--------+--------+--------------------------------------+--------------------------------------+---------------------------+------------+----------------------+-------------+
 
# resume specific 
> ./ocis/bin/ocis postprocessing resume -u 1b403b5c-73b5-479d-a4f3-ba57d7e96a9c 

# restart postprocessing for the given uploadI
> ./ocis/bin/ocis postprocessing resume -r -u 5032795f-86a9-44ca-9a88-7b0f288ed7fc
 
# resume all uploads in the given postprocessing step 
POSTPROCESSING_STEPS = virusscan  (if you find other steps eligible then please add)
> ./ocis/bin/ocis postprocessing resume                # Resumes all uploads where postprocessing is finished, but upload is not finished
> ./ocis/bin/ocis postprocessing resume -s "finished"  # Equivalent to the above
> ./ocis/bin/ocis postprocessing resume -s "virusscan" # Resume all uploads currently in virusscan step

How to obtain failed upload

  • set POSTPROCESSING_DELAY env and upload resources, and while uploading, restart ocis service using ocis-wrapper. This way you get an unfinished upload
  • If you have alternative, then you can use that also

Test coverage

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions