glance.tests.functional.v1 package

Submodules

glance.tests.functional.v1.test_api module

Functional test case that utilizes httplib2 against the API server

class glance.tests.functional.v1.test_api.TestApi(*args, **kwargs)[source]

Bases: glance.tests.functional.FunctionalTest

Functional tests using httplib2 against the API server

test_checksum_32_chars_at_image_create()[source]
test_download_non_exists_image_raises_http_forbidden()[source]

We test the following sequential series of actions:

0. POST /images with public image named Image1
   and no custom properties
   - Verify 201 returned
1. HEAD image
   - Verify HTTP headers have correct information we just added
2. GET image
   - Verify all information on image we just added is correct
3. DELETE image1
   - Delete the newly added image
4. GET image
   - Verify that 403 HTTPForbidden exception is raised prior to
     404 HTTPNotFound
test_download_non_exists_image_raises_http_not_found()[source]

We test the following sequential series of actions:

0. POST /images with public image named Image1 and no custom properties - Verify 201 returned 1. HEAD image - Verify HTTP headers have correct information we just added 2. GET image - Verify all information on image we just added is correct 3. DELETE image1 - Delete the newly added image 4. GET image - Verify that 404 HTTPNotFound exception is raised

test_get_head_simple_post(*a, **kwargs)[source]

We test the following sequential series of actions:

0. GET /images - Verify no public images 1. GET /images/detail - Verify no public images 2. POST /images with public image named Image1 and no custom properties - Verify 201 returned 3. HEAD image - Verify HTTP headers have correct information we just added 4. GET image - Verify all information on image we just added is correct 5. GET /images - Verify the image we just added is returned 6. GET /images/detail - Verify the image we just added is returned 7. PUT image with custom properties of “distro” and “arch” - Verify 200 returned 8. PUT image with too many custom properties - Verify 413 returned 9. GET image - Verify updated information about image was stored 10. PUT image - Remove a previously existing property. 11. PUT image - Add a previously deleted property. 12. PUT image/members/member1 - Add member1 to image 13. PUT image/members/member2 - Add member2 to image 14. GET image/members - List image members 15. DELETE image/members/member1 - Delete image member1 16. PUT image/members - Attempt to replace members with an overlimit amount 17. PUT image/members/member11 - Attempt to add a member while at limit 18. POST /images with another public image named Image2 - attribute and three custom properties, “distro”, “arch” & “foo” - Verify a 200 OK is returned 19. HEAD image2 - Verify image2 found now 20. GET /images - Verify 2 public images 21. GET /images with filter on user-defined property “distro”. - Verify both images are returned 22. GET /images with filter on user-defined property ‘distro’ but - with non-existent value. Verify no images are returned 23. GET /images with filter on non-existent user-defined property - “boo”. Verify no images are returned 24. GET /images with filter ‘arch=i386’ - Verify only image2 is returned 25. GET /images with filter ‘arch=x86_64’ - Verify only image1 is returned 26. GET /images with filter ‘foo=bar’ - Verify only image2 is returned 27. DELETE image1 - Delete image 28. GET image/members - List deleted image members 29. PUT image/members/member2 - Update existing member2 of deleted image 30. PUT image/members/member3 - Add member3 to deleted image 31. DELETE image/members/member2 - Delete member2 from deleted image 32. DELETE image2 - Delete image 33. GET /images - Verify no images are listed

test_param_int_too_large_at_create()[source]
test_status_cannot_be_manipulated_directly()[source]

glance.tests.functional.v1.test_copy_to_file module

Tests copying images to a Glance API server which uses a filesystem- based storage backend.

class glance.tests.functional.v1.test_copy_to_file.TestCopyToFile(*args, **kwargs)[source]

Bases: glance.tests.functional.FunctionalTest

Functional tests for copying images from the HTTP storage backend to file

test_copy_from_file(*a, **kwargs)[source]

Ensure we can’t copy from file

test_copy_from_http_exists(*a, **kwargs)[source]

Ensure we can copy from an external image in HTTP.

test_copy_from_http_nonexistent_location_url(*a, **kwargs)[source]
test_copy_from_http_store(*a, **kwargs)[source]

Ensure we can copy from an external image in HTTP store.

test_copy_from_swift_config(*a, **kwargs)[source]

Ensure we can’t copy from swift+config

glance.tests.functional.v1.test_misc module

class glance.tests.functional.v1.test_misc.TestMiscellaneous(*args, **kwargs)[source]

Bases: glance.tests.functional.FunctionalTest

Some random tests for various bugs and stuff

setUp()[source]
test_api_response_when_image_deleted_from_filesystem()[source]

A test for LP bug #781410 – glance should fail more gracefully on requests for images that have been removed from the fs

test_exception_not_eaten_from_registry_to_api()[source]

A test for LP bug #704854 – Exception thrown by registry server is consumed by API server.

We start both servers daemonized.

We then use Glance API to try adding an image that does not meet validation requirements on the registry server and test that the error returned from the API server is appropriate

glance.tests.functional.v1.test_multiprocessing module

class glance.tests.functional.v1.test_multiprocessing.TestMultiprocessing(*args, **kwargs)[source]

Bases: glance.tests.functional.FunctionalTest

Functional tests for the bin/glance CLI tool

setUp()[source]
test_interrupt_avoids_respawn_storm()[source]

Ensure an interrupt signal does not cause a respawn storm. See bug #978130

test_multiprocessing()[source]

Spin up the api servers with multiprocessing on

Module contents