Skip to content

[QA] [CLI] Add cli test coverage for managing unifinished upload using storage-user #11274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
amrita-shrestha opened this issue Apr 28, 2025 · 0 comments
Assignees
Labels

Comments

@amrita-shrestha
Copy link
Contributor

Add cli test coverage for managing unfinished uploads using storage-user service cli command

# 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                   |        |        |                                      |                                      |                           |            |                      |             |
+--------------------------------------+--------------------------------------+--------------------------------+--------+--------+--------------------------------------+--------------------------------------+---------------------------+------------+----------------------+-------------+

> ./ocis/bin/ocis storage-users uploads sessions --restart                  
Sessions:
+-------+-----------+------+--------+------+-----------+-------+---------+------------+-----------+-------------+
| Space | Upload Id | Name | Offset | Size | Executant | Owner | Expires | Processing | Scan Date | Scan Result |
+-------+-----------+------+--------+------+-----------+-------+---------+------------+-----------+-------------+
+-------+-----------+------+--------+------+-----------+-------+---------+------------+-----------+-------------+

> ./ocis/bin/ocis storage-users uploads sessions --resume                   
Sessions:
+-------+-----------+------+--------+------+-----------+-------+---------+------------+-----------+-------------+
| Space | Upload Id | Name | Offset | Size | Executant | Owner | Expires | Processing | Scan Date | Scan Result |
+-------+-----------+------+--------+------+-----------+-------+---------+------------+-----------+-------------+
+-------+-----------+------+--------+------+-----------+-------+---------+------------+-----------+-------------+

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

(Feel free to add more point if you find any)

  • resume
  • restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants