Functional test case that utilizes httplib2 against the API server
Bases: glance.tests.functional.FunctionalTest
Functional tests using httplib2 against the API server
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
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
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
Tests copying images to a Glance API server which uses a filesystem- based storage backend.
Bases: glance.tests.functional.FunctionalTest
Functional tests for copying images from the HTTP storage backend to file
Ensure we can copy from an external image in HTTP.
Bases: glance.tests.functional.FunctionalTest
Some random tests for various bugs and stuff
A test for LP bug #781410 – glance should fail more gracefully on requests for images that have been removed from the fs
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
Bases: glance.tests.functional.FunctionalTest
Functional tests for the bin/glance CLI tool