glance.tests.functional.db package

Submodules

glance.tests.functional.db.base module

class glance.tests.functional.db.base.DBPurgeTests(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

build_fixtures()[source]
create_images(images)[source]
create_tasks(tasks)[source]
setUp()[source]
test_db_purge()[source]
class glance.tests.functional.db.base.DriverQuotaTests(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

setUp()[source]
test_storage_quota()[source]
test_storage_quota_deleted_image()[source]
test_storage_quota_multiple_locations()[source]
test_storage_quota_without_image_id()[source]
class glance.tests.functional.db.base.DriverTests[source]

Bases: object

test_filter_image_by_invalid_operator()[source]
test_image_create_bad_checksum()[source]
test_image_create_bad_int_params()[source]
test_image_create_bad_location()[source]
test_image_create_bad_name()[source]
test_image_create_bad_property()[source]
test_image_create_defaults(*args, **keywargs)[source]
test_image_create_duplicate_id()[source]
test_image_create_properties()[source]
test_image_create_requires_status()[source]
test_image_create_unknown_attributes()[source]
test_image_create_with_location_data()[source]
test_image_create_with_locations()[source]
test_image_create_without_locations()[source]
test_image_destroy()[source]
test_image_destroy_with_delete_all()[source]

Check the image child element’s _image_delete_all methods.

checks if all the image_delete_all methods deletes only the child elements of the image to be deleted.

test_image_get()[source]
test_image_get_all()[source]
test_image_get_all_invalid_sort_key()[source]
test_image_get_all_limit()[source]
test_image_get_all_limit_marker()[source]
test_image_get_all_marker()[source]
test_image_get_all_marker_deleted()[source]

Cannot specify a deleted image as a marker.

test_image_get_all_marker_deleted_showing_deleted()[source]

Specify a deleted image as a marker if showing deleted images.

A non-admin user has to explicitly ask for deleted images, and should only see deleted images in the results

test_image_get_all_marker_deleted_showing_deleted_as_admin()[source]

Specify a deleted image as a marker if showing deleted images.

test_image_get_all_marker_null_container_format_asc()[source]

Check an image with container_format null is handled

Check an image with container_format null is handled when marker is specified and order is ascending

test_image_get_all_marker_null_container_format_desc()[source]

Check an image with container_format null is handled

Check an image with container_format null is handled when marker is specified and order is descending

test_image_get_all_marker_null_disk_format_asc()[source]

Check an image with disk_format null is handled

Check an image with disk_format null is handled when marker is specified and order is ascending

test_image_get_all_marker_null_disk_format_desc()[source]

Check an image with disk_format null is handled

Check an image with disk_format null is handled when marker is specified and order is descending

test_image_get_all_marker_null_name_asc()[source]

Check an image with name null is handled

Check an image with name null is handled when marker is specified and order is ascending

test_image_get_all_marker_null_name_desc()[source]

Check an image with name null is handled

Check an image with name null is handled marker is specified and order is descending

test_image_get_all_marker_with_size()[source]
test_image_get_all_owned()[source]
test_image_get_all_owned_checksum()[source]
test_image_get_all_size_max()[source]
test_image_get_all_size_min()[source]
test_image_get_all_size_min_max()[source]
test_image_get_all_size_range()[source]
test_image_get_all_with_filter()[source]
test_image_get_all_with_filter_comparative_created_at()[source]
test_image_get_all_with_filter_comparative_updated_at()[source]
test_image_get_all_with_filter_deleted_tags()[source]
test_image_get_all_with_filter_in_container_format()[source]
test_image_get_all_with_filter_in_disk_format()[source]
test_image_get_all_with_filter_in_id()[source]
test_image_get_all_with_filter_in_name()[source]
test_image_get_all_with_filter_in_status()[source]
test_image_get_all_with_filter_max_range_bad_value()[source]
test_image_get_all_with_filter_min_range_bad_value()[source]
test_image_get_all_with_filter_multi_tags()[source]
test_image_get_all_with_filter_multiple_user_defined_properties()[source]
test_image_get_all_with_filter_nonexistent_user_defined_property()[source]
test_image_get_all_with_filter_nonexistent_userdef_property()[source]
test_image_get_all_with_filter_tags()[source]
test_image_get_all_with_filter_tags_and_nonexistent()[source]
test_image_get_all_with_filter_undefined_property()[source]
test_image_get_all_with_filter_undefined_tags()[source]
test_image_get_all_with_filter_user_defined_property()[source]
test_image_get_all_with_filter_user_deleted_property()[source]
test_image_get_all_with_filter_userdef_prop_nonexistent_value()[source]
test_image_get_all_with_invalid_quotes()[source]
test_image_get_all_with_quotes()[source]
test_image_get_all_with_tag_returning()[source]
test_image_get_allow_deleted()[source]
test_image_get_disallow_deleted()[source]
test_image_get_force_allow_deleted()[source]
test_image_get_multiple_members()[source]
test_image_get_not_found()[source]
test_image_get_not_owned()[source]
test_image_member_count()[source]
test_image_member_count_empty_image_id()[source]
test_image_member_count_invalid_image_id()[source]
test_image_member_create(*args, **keywargs)[source]
test_image_member_delete()[source]
test_image_member_find()[source]
test_image_member_update()[source]
test_image_member_update_status()[source]
test_image_paginate()[source]

Paginate through a list of images using limit and marker

test_image_property_delete()[source]
test_image_tag_create()[source]
test_image_tag_create_bad_value()[source]
test_image_tag_delete()[source]
test_image_tag_get_all()[source]
test_image_tag_get_all_no_tags()[source]
test_image_tag_get_all_non_existent_image()[source]
test_image_tag_set_all()[source]
test_image_update()[source]
test_image_update_bad_location()[source]
test_image_update_bad_name()[source]
test_image_update_bad_property()[source]
test_image_update_core_attribute()[source]
test_image_update_properties()[source]
test_image_update_purge_properties()[source]
test_image_update_with_location_data()[source]
test_image_update_with_locations()[source]
test_is_image_visible()[source]
test_update_locations_direct()[source]

For some reasons update_locations can be called directly (not via image_update), so better check that everything is ok if passed 4 byte unicode characters

class glance.tests.functional.db.base.FunctionalInitWrapper(*args, **kwargs)[source]

Bases: glance.tests.functional.FunctionalTest

setUp()[source]
class glance.tests.functional.db.base.MembershipVisibilityTests[source]

Bases: object

test_admin_finding_owner1s_image_members()[source]

Admin should see all memberships of owner1’s image

test_admin_finding_user1_memberships()[source]

Admin should see all images shared with User1

test_owner1_finding_owner1s_image_members()[source]

Owner1 should see all memberships of its image

test_owner1_finding_user1_memberships()[source]

Owner1 should see images it owns that are shared with User1.

test_user1_finding_owner1s_image_members()[source]

User1 should see its own membership of owner1’s image

test_user1_finding_user1_memberships()[source]

User1 should see all images shared with User1

test_user2_finding_owner1s_image_members()[source]

User2 should see its own membership of owner1’s image

test_user2_finding_user1_memberships()[source]

User2 should see no images shared with User1

test_user3_finding_owner1s_image_members()[source]

User3 should see no memberships of owner1’s image

class glance.tests.functional.db.base.TaskTests(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

build_task_fixtures()[source]
setUp()[source]
test_task_create()[source]
test_task_create_with_all_task_info_null()[source]
test_task_delete()[source]
test_task_delete_as_admin()[source]
test_task_get()[source]
test_task_get_all()[source]
test_task_get_all_as_admin()[source]
test_task_get_all_limit()[source]
test_task_get_all_marker()[source]
test_task_get_all_owned()[source]
test_task_get_all_with_filter()[source]
test_task_update()[source]
test_task_update_with_all_task_info_null()[source]
class glance.tests.functional.db.base.TestDriver(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

build_image_fixtures()[source]
create_images(images)[source]
setUp()[source]
class glance.tests.functional.db.base.TestMembershipVisibility(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

setUp()[source]
class glance.tests.functional.db.base.TestVisibility(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

build_image_fixtures()[source]
create_images(images)[source]
setUp()[source]
setup_contexts()[source]
setup_tenants()[source]
class glance.tests.functional.db.base.VisibilityTests[source]

Bases: object

test_admin_as_user_true()[source]
test_admin_is_public_false_and_visibility_private()[source]
test_admin_is_public_false_and_visibility_public()[source]
test_admin_is_public_true_and_visibility_private()[source]
test_admin_is_public_true_and_visibility_public()[source]
test_is_public_is_a_normal_filter_for_admin()[source]
test_is_public_is_a_normal_filter_for_user()[source]
test_known_admin_is_public_false()[source]
test_known_admin_is_public_none()[source]
test_known_admin_is_public_true()[source]
test_known_admin_sees_all()[source]
test_known_admin_visibility_private()[source]
test_known_admin_visibility_public()[source]
test_tenant1_is_public_false()[source]
test_tenant1_is_public_false_and_visibility_private()[source]
test_tenant1_is_public_false_and_visibility_public()[source]
test_tenant1_is_public_none()[source]
test_tenant1_is_public_true()[source]
test_tenant1_is_public_true_and_visibility_private()[source]
test_tenant1_is_public_true_and_visibility_public()[source]
test_tenant1_visibility_private()[source]
test_tenant1_visibility_public()[source]
test_unknown_admin_is_public_false()[source]
test_unknown_admin_is_public_none()[source]
test_unknown_admin_is_public_true()[source]
test_unknown_admin_sees_all()[source]
test_unknown_admin_visibility_private()[source]
test_unknown_admin_visibility_public()[source]
test_unknown_user_is_public_false()[source]
test_unknown_user_is_public_none()[source]
test_unknown_user_is_public_true()[source]
test_unknown_user_visibility_private()[source]
test_unknown_user_visibility_public()[source]
test_what_tenant1_sees()[source]
test_what_unknown_user_sees()[source]
glance.tests.functional.db.base.build_image_fixture(**kwargs)[source]
glance.tests.functional.db.base.build_task_fixture(**kwargs)[source]

glance.tests.functional.db.base_glare module

class glance.tests.functional.db.base_glare.ArtifactTests[source]

Bases: object

test_artifact_create()[source]
test_artifact_create_none_valued_props()[source]
test_artifact_create_same_version_deleted()[source]
test_artifact_create_same_version_different_users()[source]
test_artifact_create_transitive_dependencies()[source]
test_artifact_create_with_dependency()[source]
test_artifact_delete()[source]
test_artifact_delete_blob()[source]
test_artifact_delete_property()[source]
test_artifact_get()[source]
test_artifact_get_all()[source]
test_artifact_get_all_properties()[source]
test_artifact_get_all_show_level()[source]
test_artifact_get_all_tags()[source]
test_artifact_get_owned()[source]
test_artifact_get_public()[source]
test_artifact_sort_order()[source]
test_artifact_update()[source]
test_artifact_update_blobs()[source]
test_artifact_update_properties()[source]
test_artifact_update_state()[source]
test_artifact_update_tags()[source]
class glance.tests.functional.db.base_glare.ArtifactsTestDriver(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

create_test_artifacts()[source]
setUp()[source]
glance.tests.functional.db.base_glare.get_fixture(**kwargs)[source]

glance.tests.functional.db.base_metadef module

class glance.tests.functional.db.base_metadef.MetadefDriverTests[source]

Bases: glance.tests.functional.db.base_metadef.MetadefNamespaceTests, glance.tests.functional.db.base_metadef.MetadefResourceTypeTests, glance.tests.functional.db.base_metadef.MetadefResourceTypeAssociationTests, glance.tests.functional.db.base_metadef.MetadefPropertyTests, glance.tests.functional.db.base_metadef.MetadefObjectTests, glance.tests.functional.db.base_metadef.MetadefTagTests

class glance.tests.functional.db.base_metadef.MetadefNamespaceTests[source]

Bases: object

test_namespace_create()[source]
test_namespace_create_duplicate()[source]
test_namespace_delete()[source]
test_namespace_delete_with_content()[source]
test_namespace_get()[source]
test_namespace_get_all_with_resource_types_filter()[source]
test_namespace_update()[source]
class glance.tests.functional.db.base_metadef.MetadefObjectTests[source]

Bases: object

test_object_create()[source]
test_object_create_duplicate()[source]
test_object_delete()[source]
test_object_get()[source]
test_object_get_all()[source]
test_object_update()[source]
class glance.tests.functional.db.base_metadef.MetadefPropertyTests[source]

Bases: object

test_property_create()[source]
test_property_create_duplicate()[source]
test_property_delete()[source]
test_property_delete_namespace_content()[source]
test_property_get()[source]
test_property_get_all()[source]
test_property_update()[source]
class glance.tests.functional.db.base_metadef.MetadefResourceTypeAssociationTests[source]

Bases: object

test_association_create()[source]
test_association_create_duplicate()[source]
test_association_delete()[source]
test_association_get_all_by_namespace()[source]
class glance.tests.functional.db.base_metadef.MetadefResourceTypeTests[source]

Bases: object

test_resource_type_get_all()[source]
class glance.tests.functional.db.base_metadef.MetadefTagTests[source]

Bases: object

test_tag_create()[source]
test_tag_create_duplicate()[source]
test_tag_create_duplicate_tags_1()[source]
test_tag_create_duplicate_tags_2()[source]
test_tag_create_tags()[source]
test_tag_delete()[source]
test_tag_get()[source]
test_tag_get_all()[source]
test_tag_update()[source]
class glance.tests.functional.db.base_metadef.TestMetadefDriver(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

Test Driver class for Metadef tests.

setUp()[source]

Run before each test method to initialize test environment.

glance.tests.functional.db.base_metadef.build_association_fixture(**kwargs)[source]
glance.tests.functional.db.base_metadef.build_namespace_fixture(**kwargs)[source]
glance.tests.functional.db.base_metadef.build_object_fixture(**kwargs)[source]
glance.tests.functional.db.base_metadef.build_property_fixture(**kwargs)[source]
glance.tests.functional.db.base_metadef.build_resource_type_fixture(**kwargs)[source]
glance.tests.functional.db.base_metadef.build_tag_fixture(**kwargs)[source]
glance.tests.functional.db.base_metadef.build_tags_fixture(tag_name_list)[source]

glance.tests.functional.db.test_registry module

class glance.tests.functional.db.test_registry.FunctionalInitWrapper(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
class glance.tests.functional.db.test_registry.TestRegistryDriver(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TestDriver, glance.tests.functional.db.base.DriverTests, glance.tests.functional.db.test_registry.FunctionalInitWrapper

setUp()[source]
tearDown()[source]
class glance.tests.functional.db.test_registry.TestRegistryMetadefDriver(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base_metadef.TestMetadefDriver, glance.tests.functional.db.base_metadef.MetadefDriverTests, glance.tests.functional.db.test_registry.FunctionalInitWrapper

setUp()[source]
tearDown()[source]
class glance.tests.functional.db.test_registry.TestRegistryQuota(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.DriverQuotaTests, glance.tests.functional.db.test_registry.FunctionalInitWrapper

setUp()[source]
tearDown()[source]
class glance.tests.functional.db.test_registry.TestTasksDriver(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TaskTests, glance.tests.functional.db.test_registry.FunctionalInitWrapper

setUp()[source]
tearDown()[source]
glance.tests.functional.db.test_registry.get_db(config)[source]
glance.tests.functional.db.test_registry.reset_db(db_api)[source]

glance.tests.functional.db.test_rpc_endpoint module

class glance.tests.functional.db.test_rpc_endpoint.TestRegistryURLVisibility(*args, **kwargs)[source]

Bases: glance.tests.functional.FunctionalTest

setUp()[source]
test_v2_enabled()[source]
test_v2_not_enabled()[source]

glance.tests.functional.db.test_simple module

class glance.tests.functional.db.test_simple.TestSimpleDriver(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TestDriver, glance.tests.functional.db.base.DriverTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
class glance.tests.functional.db.test_simple.TestSimpleMembershipVisibility(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TestMembershipVisibility, glance.tests.functional.db.base.MembershipVisibilityTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
class glance.tests.functional.db.test_simple.TestSimpleQuota(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.DriverQuotaTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
class glance.tests.functional.db.test_simple.TestSimpleTask(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TaskTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
class glance.tests.functional.db.test_simple.TestSimpleVisibility(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TestVisibility, glance.tests.functional.db.base.VisibilityTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
glance.tests.functional.db.test_simple.get_db(config)[source]
glance.tests.functional.db.test_simple.reset_db(db_api)[source]

glance.tests.functional.db.test_sqlalchemy module

class glance.tests.functional.db.test_sqlalchemy.TestArtifacts(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base_glare.ArtifactsTestDriver, glance.tests.functional.db.base_glare.ArtifactTests

setUp()[source]
class glance.tests.functional.db.test_sqlalchemy.TestDBPurge(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.DBPurgeTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
class glance.tests.functional.db.test_sqlalchemy.TestMetadefSqlAlchemyDriver(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base_metadef.TestMetadefDriver, glance.tests.functional.db.base_metadef.MetadefDriverTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
class glance.tests.functional.db.test_sqlalchemy.TestSqlAlchemyDBDataIntegrity(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TestDriver, glance.tests.functional.db.base.FunctionalInitWrapper

Test class for checking the data integrity in the database.

Helpful in testing scenarios specific to the sqlalchemy api.

setUp()[source]
test_paginate_non_redundant_sort_keys()[source]
test_paginate_redundant_sort_keys()[source]
class glance.tests.functional.db.test_sqlalchemy.TestSqlAlchemyDriver(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TestDriver, glance.tests.functional.db.base.DriverTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
test_get_image_with_invalid_long_image_id()[source]
test_image_tag_delete_with_invalid_long_image_id()[source]
test_image_tag_get_all_with_invalid_long_image_id()[source]
test_user_get_storage_usage_with_invalid_long_image_id()[source]
class glance.tests.functional.db.test_sqlalchemy.TestSqlAlchemyMembershipVisibility(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TestMembershipVisibility, glance.tests.functional.db.base.MembershipVisibilityTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
class glance.tests.functional.db.test_sqlalchemy.TestSqlAlchemyQuota(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.DriverQuotaTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
class glance.tests.functional.db.test_sqlalchemy.TestSqlAlchemyTask(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TaskTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
class glance.tests.functional.db.test_sqlalchemy.TestSqlAlchemyVisibility(*args, **kwargs)[source]

Bases: glance.tests.functional.db.base.TestVisibility, glance.tests.functional.db.base.VisibilityTests, glance.tests.functional.db.base.FunctionalInitWrapper

setUp()[source]
glance.tests.functional.db.test_sqlalchemy.get_db(config)[source]
glance.tests.functional.db.test_sqlalchemy.reset_db(db_api)[source]
glance.tests.functional.db.test_sqlalchemy.reset_db_artifacts(db_api)[source]
glance.tests.functional.db.test_sqlalchemy.reset_db_metadef(db_api)[source]

Module contents

glance.tests.functional.db.load(get_db_fn, reset_db_fn)[source]
glance.tests.functional.db.reset()[source]