api.v1.test_images_report¶
Test account report summary API.
| caseautomation: | automated |
|---|---|
| casecomponent: | api |
| caseimportance: | high |
| caselevel: | integration |
| requirement: | Cloud Meter |
| testtype: | functional |
| upstream: | yes |
-
integrade.tests.api.v1.test_images_report.test_image_report_empty()¶ Test accounts without any instance or image report has empty summary.
Id: 2a152ef6-fcd8-491c-b3cc-bda81699453a
Description: Test that an account without any instances or images shows up in the results with 0 counts.
Steps: - Add a cloud account
- GET from the image report endpoint
Expectedresults: - An empty list is returned
-
integrade.tests.api.v1.test_images_report.test_image_tagging(conf)¶ Test instance events generate image usage results with correct tags.
Id: f3c84697-a40c-40d9-846d-117e2647e9d3
Description: Test combinations of image tags, start/end events, and the resulting counts from the summary report API.
Steps: - Add a cloud account
- Insert instance, image, and event data
- GET from the image report endpoint
Expectedresults: - The images have correct tags and usage amounts
-
integrade.tests.api.v1.test_images_report.test_list_images_while_impersonating(impersonate)¶ Test account data fetched via impersonating a user as a superuser.
Id: 5f99c7ec-a4d3-4040-868f-9340015e4c9c
Description: Test that the same assertions can be made for fetching data as a regular user and fetching data impersonating that same user
Steps: - Add a cloud account
- Insert instance, image, and event data
3) GET from the image report endpoint as regular user 3) GET from the image report endpoint as super user impersonating
Expectedresults: - The images are returned for the user and a super user, but
- no one else.
-
integrade.tests.api.v1.test_images_report.test_past_without_instances()¶ Test accounts with instances only after the filter period.
Id: 72aaa6e2-2c60-4e71-bb47-3644bd6beb71
Description: Test that an account with instances that were created prior to the current report end date.
Steps: - Add a cloud account
- Inject instance data for today
- GET from the account report endpoint for 30 days ago
Expectedresults: - The account is in the response and matches the created account
- Instances, images, RHEL, and Openshift all have None counts