Bases: glance.tests.unit.base.StoreClearingUnitTest
Unit test case that establishes a mock environment within a testing directory (in isolation)
Bases: object
Bases: object
Simple class that masks the inconsistency between webob.Response.status_int and httplib.Response.status
Bases: glance.tests.utils.BaseTestCase
Bases: glance.tests.utils.BaseTestCase
Test that the Keystone auth plugin works properly
Test that a 400 during authenticate raises exception.AuthBadRequest
Test that a 400 during authenticate raises exception.AuthBadRequest
Bases: object
Bases: glance.tests.unit.base.IsolatedUnitTest
Test for cache middleware skip processing when request context has not ‘download_image’ role.
Test for determining image is deleted from cache when it is not found in Glance Registry.
Test for determining that when an admin tries to download a deleted image it returns 404 Not Found error.
Test process_request for v1 api where member role able to download the image with custom property.
Test process_request for v1 api where _member_ role not able to download the image with custom property.
Test process_request for v1 api where registry raises NotFound exception as image metadata not found.
Test process_request for v2 api where member role able to download the image with custom property.
Test process_request for v2 api where _member_ role not able to download the image with custom property.
Bases: glance.tests.unit.base.IsolatedUnitTest
Test for cache middleware raise webob.exc.HTTPForbidden directly when request context has not ‘download_image’ role.
Test process_response for v1 api where member role able to download the image with custom property.
Test process_response for v1 api where _member_ role not able to download the image with custom property.
Test process_response for v1 api where registry raises NotFound exception as image metadata not found.
Bases: testtools.testcase.TestCase
Bases: glance.api.policy.Enforcer
Bases: glance.tests.utils.BaseTestCase
Perform a context visibility test. Creates a (fake) image with the specified owner and is_public attributes, then creates a context with the given keyword arguments and expects exp_res as the result of an is_image_visible() call on the context.
Tests that an anonymous context (with is_admin set to False) can access an unowned image with is_public set to False.
Tests that an anonymous context (with is_admin set to False) cannot access an owned image with is_public set to False.
Tests that an anonymous context (with is_admin set to False) can access an image with is_public set to True.
Tests that an anonymous context (with is_admin set to False) can access an owned image with is_public set to True.
Tests that an authenticated context (with is_admin set to False) can access an image with is_public set to False.
Tests that an authenticated context (with is_admin set to False) can access an image (which it does own) with is_public set to False.
Tests that an authenticated context (with is_admin set to False) cannot access an image (which it does not own) with is_public set to False.
Tests that an authenticated context (with is_admin set to False) can access an image with is_public set to True.
Tests that an authenticated context (with is_admin set to False) can access an image (which it does own) with is_public set to True.
Tests that an authenticated context (with is_admin set to False) can access an image (which it does not own) with is_public set to True.
Tests that an empty context (with is_admin set to True) can access an image with is_public set to False.
Tests that an empty context (with is_admin set to True) can access an owned image with is_public set to False.
Tests that an empty context (with is_admin set to True) can access an image with is_public set to True.
Bases: glance.tests.utils.BaseTestCase
Bases: glance.tests.utils.BaseTestCase
Bases: glance.common.glare.definitions.ArtifactType
Bases: glance.tests.utils.BaseTestCase
Bases: glance.tests.utils.BaseTestCase
Bases: object
Bases: object
Bases: object
Bases: object
Bases: glance.contrib.plugins.artifacts_sample.v1.artifact.MyArtifact
Bases: glance.contrib.plugins.artifacts_sample.v1.artifact.MyArtifact
Bases: glance.tests.utils.BaseTestCase
A test to show that plugin-load specific options in artifacts.conf are correctly processed:
- no plugins can be loaded if load_enabled = False
- if available_plugins list is given only plugins specified can be be loaded
Bases: glance.common.glare.definitions.ArtifactType
Bases: object
Test to see if the caching iterator interacts properly with the driver When the iterator completes going through the data the driver should have closed the image and placed it correctly
Test to see if the caching iterator interacts properly with the driver in a case where the iterator is only partially consumed. In this case the image is only partially filled in cache and filling wont resume. When the iterator goes out of scope the driver should have closed the image and moved it from incomplete/ to invalid/
Test that when the backend fails, caching_iter does not continue trying to consume data, and rolls back the cache.
Test the clean method removes the stalled images as expected
Test convenience wrapper for querying cache file size via its image identifier.
Verify is_cached(1) returns 0, then add something to the cache and verify is_cached(1) returns 1.
Test convenience wrapper for opening a cache file via its image identifier.
Test to see if open_for_write works in a failure case for each driver This case is where an exception is raised while the file is being written. The image is partially filled in cache and filling wont resume so verify the image is moved to invalid/ directory
Bases: glance.tests.utils.BaseTestCase, glance.tests.unit.test_image_cache.ImageCacheTestCase
Tests image caching when SQLite is used in cache
Bases: glance.tests.utils.BaseTestCase, glance.tests.unit.test_image_cache.ImageCacheTestCase
Tests image caching when xattr is used in cache
Bases: glance.common.jsonpatchvalidator.JsonPatchValidatorMixin
Tests for database migrations run a series of test cases to ensure that migrations work properly both upgrading and downgrading, and that no data loss occurs if possible.
Bases: oslo_db.sqlalchemy.test_migrations.WalkVersionsMixin
Bases: glance.tests.unit.test_migrations.ModelsMigrationSyncMixin, oslo_db.sqlalchemy.test_migrations.ModelsMigrationsSync, oslo_db.sqlalchemy.test_base.MySQLOpportunisticTestCase
Bases: glance.tests.unit.test_migrations.ModelsMigrationSyncMixin, oslo_db.sqlalchemy.test_migrations.ModelsMigrationsSync, oslo_db.sqlalchemy.test_base.PostgreSQLOpportunisticTestCase
Bases: glance.tests.unit.test_migrations.ModelsMigrationSyncMixin, oslo_db.sqlalchemy.test_migrations.ModelsMigrationsSync, oslo_db.sqlalchemy.test_base.DbTestCase
Bases: oslo_db.sqlalchemy.test_base.MySQLOpportunisticTestCase, glance.tests.unit.test_migrations.MigrationsMixin
Bases: oslo_db.sqlalchemy.test_base.PostgreSQLOpportunisticTestCase, glance.tests.unit.test_migrations.MigrationsMixin
Bases: oslo_db.sqlalchemy.test_base.DbTestCase, glance.tests.unit.test_migrations.MigrationsMixin
Bases: glance.domain.Image
Bases: glance.domain.Task
Bases: glance.domain.TaskStub
Bases: glance.tests.utils.BaseTestCase
Test Image Member Notifications work
Bases: glance.tests.utils.BaseTestCase
Test Image Notifications work
Bases: glance.tests.utils.BaseTestCase
Test Task Notifications work
Bases: object
Bases: object
Bases: object
Bases: glance.tests.utils.BaseTestCase
Bases: glance.common.glare.definitions.ArtifactType
Bases: object
Bases: glance.tests.unit.test_versions.VersionNegotiationTest, glance.tests.unit.test_versions.VersionsTest
Test that versions mentioned in the versions response are correctly negotiated.
Bases: object
Bases: object