Implementing test coverage for Glance v2 Import Export

Registered by Luke Wollney

This is a blueprint for implementing test coverage for the glance v2 API Import Export.

API Doc: Not available

Blueprints to be referred to:

In scope: smoke, functional, system integration, whitebox tests

Out of scope: performance, stress, scale

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Luke Wollney
Direction:
Needs approval
Assignee:
None
Definition:
Drafting
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Notes about the tasks/tests below:
  - All tests determined to be "INVALID" have been removed
  - All tasks/tests are currently assigned to luke-wollney, but will be changed as tasks are picked up

Gerrit topic: https://review.openstack.org/#q,topic:bp/glance-api-v2-import-export-tests,n,z

Addressed by: https://review.openstack.org/64373
    Update images fixtures with task variables

Addressed by: https://review.openstack.org/64374
    Add create_import_task test

Addressed by: https://review.openstack.org/64375
    Add get task schemas and get task tests

Addressed by: https://review.openstack.org/64376
    Add get tasks, share imported image, and task states tests

Addressed by: https://review.openstack.org/66690
    Update get_image_file test

(?)

Work Items

Work items:
[luke-wollney] Happy Path - Get schema of task and make sure it returns 200: TODO
[luke-wollney] Get schema of task and make sure response returns schema definition of task: TODO
[luke-wollney] Get schema with task id throws error: TODO
[luke-wollney] Get schema with POST method: TODO
[luke-wollney] Happy Path - List all tasks and make sure it returns response code 200 and valid response object: TODO
[luke-wollney] Verify list all tasks returns only tasks owned by the user making the request and not others: TODO
[luke-wollney] Verify list all tasks with filter 'type' returns only non-expired tasks owned by the user making request: TODO
[luke-wollney] List all tasks with filter 'type' other than 3 values : 'import', 'export' and 'clone' should throw error: TODO
[luke-wollney] List all tasks with invalid method 'POST': TODO
[luke-wollney] Verify list all tasks with filter 'status' returns only non-expired tasks owned by the user making request: TODO
[luke-wollney] List all tasks with filter 'status' other than 4 values : 'pending', 'processing', 'success' and 'failure' should throw error: TODO
[luke-wollney] Verify list all tasks with invalid filter(other than type and status) throws error: TODO
[luke-wollney] List all tasks with pagination: TODO
[luke-wollney] List all tasks with sorting capability: TODO
[luke-wollney] Happy Path - Get a valid task details and make sure it returns 200 and response object is expected: TODO
[luke-wollney] Get a valid task details and make sure value of task response is expected: TODO
[luke-wollney] Properties and expected values: TODO
[luke-wollney] Mandatory params: id is unique owner is tenant_id, type is import/export/clone, status is pending/processing/success/failure, input, created_at, updated_at: TODO
[luke-wollney] Additional params: expires_at, message and result based on  status value: TODO
[luke-wollney] Get details of invalid task  - should return 404: TODO
[luke-wollney] Ge details of blank task - should return 404: TODO
[luke-wollney] Get details of expired task - should return 404: TODO
[luke-wollney] Get details of task not owned by that user - should return 404: TODO
[luke-wollney] Get details of task with invalid method POST: TODO
[luke-wollney] Happy Path - Create a import task with mandatory params type and input. Verify it returns 201 with location /v2/tasks/{task-uuid}: TODO
[luke-wollney] Create an export task with mandatory params type and input. Verify it returns 201 with location /v2/tasks/{task-uuid}: TODO
[luke-wollney] Create a clone task with mandatory params type and input. Verify it returns 201 with location /v2/tasks/{task-uuid}: TODO
[luke-wollney] Create a task without request body (missing type and input): TODO
[luke-wollney] Create a task with extra param: TODO
[luke-wollney] Create a task with invalid value for type (valid values: import, export, clone): TODO
[luke-wollney] Create an import task with missing input request (required input  params: import_from, import_from_format, image_properties): TODO
[luke-wollney] Create a export task with missing input request (required input  params: image_id, export_to, export_format): TODO
[luke-wollney] Create task with invalid method 'PUT' or 'GET': TODO
[luke-wollney] Verify task states - successful flow for import task: pending -> processing -> success and make sure task result has image uuid of imported image: TODO
[luke-wollney] Verify task states - failure flow for import task: pending -> processing -> failure and make sure task message has error details: TODO
[luke-wollney] Verify task states - successful flow for export task: pending -> processing -> success and make sure task result has location of exported image: TODO
[luke-wollney] Verify task states - failure flow for export task: pending -> processing -> failure and make sure task message has error details: TODO
[luke-wollney] Verify task states - successful flow for clone task: pending -> processing -> success and make sure task result has image uuid of cloned image: TODO
[luke-wollney] Verify task states - failure flow for clone task: pending -> processing -> failure and make sure task message has error details: TODO
[luke-wollney] Create a task with valid input, once task is in processing status, change the input to an invalid value and make sure async worker completes the task gracefully with failure status and an error message: TODO
[luke-wollney] Verify that when while processing task, when worker gets stuck/crashes, the task is picked up and handled by another worker: TODO
[luke-wollney] Verify that when worker tries to upload large image and reaches timeout, a timeout error message is thrown and gracefully fails: TODO
[luke-wollney] Verify that an imported image to the Glance container can be accessed by other customers through GET /image API call and that the customer can export that image to the customer's container: TODO
[luke-wollney] Verify that an exported image cannot be imported again: TODO
[luke-wollney] Verify that an imported image into the Glance container is same image as in the customer's container: TODO
[luke-wollney] Verify that an exported image in the customer's container is same image as in the Glance container: TODO
[luke-wollney] Verify that an import task doesn't affect source image in customer's container: TODO
[luke-wollney] Verify that an export task doesn't affect source image in Glance container: TODO
[luke-wollney] When worker is in the middle of processing an import task, verify that deleting an image from the customer's container fails gracefully: TODO
[luke-wollney] When worker is in the middle of processing an export task, verify that deleting an image from the Glance container fails gracefully: TODO
[luke-wollney] When a worker is in the middle of processing a failure of an import/export/clone, verify that the partially uploaded/downloaded/cloned image is deleted: TODO
[luke-wollney] Verify protected properties configurations apply to imported/exported/cloned images as well: TODO
[luke-wollney] After a customer imports an image to the Glance container, verify that the customer is the owner of that image and only the customer can share the image with other members: TODO
[luke-wollney] After a customer exports an image from the Glance container, verify that the customer is no longer the owner of image and can no longer share the image with others: TODO
[luke-wollney] After the import process, verify that deleting an image from the customer's container doesn't affect the imported image in the Glance container: TODO
[luke-wollney] After the export process, verify that deleting an image from the Glance container doesn't affect exported image in the customer's container: TODO
[luke-wollney] After the clone process, verify that deleting source image doesn't affect the cloned image: TODO
[luke-wollney] Verify that importing the same image to the Glance container more than once is not allowed: TODO
[luke-wollney] Verify that exporting same image to the same customer's container more than once is allowed: TODO
[luke-wollney] Verify that a task is not picked up by more than one worker for processing: TODO
[luke-wollney] Verify that an expired task is only soft deleted and available for further tracking by customer support: TODO
[luke-wollney] When more than one import/export task is created at same time, verify that each task is handled properly by the workers: TODO
[luke-wollney] When attempting to import an image with a video/jpg file, verify that the system fails gracefully with error: TODO

This blueprint contains Public information 
Everyone can see this information.