cinder/cinder/tests/unit
whoami-rajat 0ba501e021 Make volume soft delete more thorough
When a volume record is soft-deleted in the database,
dependent records in other tables (for example,
Transfers, VolumeGlanceMetadata, etc.) must be soft
deleted as well.  Otherwise, we will get FK dependency
errors when the database is purged.

This patch adds that support for VolumeAttachment table.
(other tables were already covered, just refactored)

Also adds tests.

Conflicts:
    test-requirements.txt

    Note: conflict is due to gate fixing patch in Stein
    I9f0fec25444ed865d56d0d250fb6d840ab5b4095, which is
    not applicable in Rocky.

Co-authored-by: Rajat Dhasmana <rajatdhasmana@gmail.com>
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>

Change-Id: Ibfa6c4ba2f162681756ec3203991351345b65346
Related-Bug: #1542169
Depends-On: https://review.opendev.org/#/c/704688/
(cherry picked from commit a5bb17bdfc)
(cherry picked from commit dd2ba49004)
2020-02-03 17:58:54 +00:00
..
api Prevent double-attachment race in attachment_reserve 2019-08-01 13:34:44 -04:00
attachments Prevent double-attachment race in attachment_reserve 2019-08-01 13:34:44 -04:00
backup Fix permissions with NFS-backed snapshots and backups 2019-01-18 11:41:02 -05:00
brick set vg_thin_pool_size to float type 2017-11-10 18:46:15 +08:00
compute Add user messages for extend volume operation 2018-06-01 09:12:07 +08:00
consistencygroup Remove unused CG code 2017-03-19 00:49:10 -04:00
db Make volume soft delete more thorough 2020-02-03 17:58:54 +00:00
glance
group Fix wrong uuid recognized when create group 2019-02-27 11:04:45 -06:00
image Pass image_id to ImageDownloadFailed 2019-01-20 21:36:08 +00:00
keymgr Add 'volume_attachment' to volume expected attributes 2019-12-26 07:37:01 +00:00
message Use constants for microversion values 2017-09-22 08:15:56 -05:00
monkey_patch_example
objects Fix DetachedInstanceError for VolumeAttachment 2019-10-01 15:37:17 -07:00
scheduler Make scheduler check online_extend_support capability 2018-06-26 14:42:34 -03:00
targets Adding NVMET target for NVMeOF 2018-05-02 20:43:11 +03:00
volume Merge "Add context to cloning snapshots in remotefs driver" into stable/rocky 2019-10-07 21:23:23 +00:00
windows Merge "SMBFS: allow snapshot ro attach" 2018-02-21 19:37:34 +00:00
zonemanager Fix for auth version change in Brcd HTTP 2019-02-23 11:44:48 +00:00
__init__.py Remove nosetests i18n fix 2016-11-29 18:16:59 +02:00
cast_as_call.py
conf_fixture.py Rename iSCSI target config options to more general 2017-12-18 08:55:01 +00:00
fake_cluster.py
fake_constants.py Update db from drivers in default groups methods 2017-03-17 11:08:06 -04:00
fake_group.py Update db from drivers in default groups methods 2017-03-17 11:08:06 -04:00
fake_group_snapshot.py Update db from drivers in default groups methods 2017-03-17 11:08:06 -04:00
fake_notifier.py Short-circuit notifications when not enabled 2017-01-30 12:31:45 +01:00
fake_objects.py
fake_service.py Fix migration 112 to use live_data_migration API 2017-10-20 18:24:33 -06:00
fake_snapshot.py Add context to cloning snapshots in remotefs driver 2019-09-13 09:00:53 -07:00
fake_utils.py
fake_volume.py Fix VolumeAttachment is not bound to a Session 2019-09-03 20:22:49 +00:00
policy.json Add cg policies and clean up old policy handling 2017-12-04 10:07:54 +08:00
test_api.py
test_api_urlmap.py
test_cleanable_manager.py Make c-vol use workers table for cleanup 2016-11-03 10:17:38 +01:00
test_cmd.py Merge "cinder-manage online_data_migrations fixes" into stable/rocky 2018-11-26 21:56:23 +00:00
test_context.py Update oslo.context RequestContext args 2017-11-21 14:56:06 -06:00
test_coordination.py Handle deprecation of inspect.getargspec 2017-11-21 12:57:05 -06:00
test_db_api.py Make volume soft delete more thorough 2020-02-03 17:58:54 +00:00
test_db_worker_api.py Prevent claiming and updating races on worker 2017-01-19 10:42:24 +01:00
test_evaluator.py
test_exception.py Make CinderException format errors fatal for tests 2018-02-06 21:17:17 +00:00
test_fixtures.py Explicitly set expected log level for tests 2017-11-17 16:58:40 -06:00
test_hacking.py Update log translation hacking rule 2017-06-29 04:05:52 -04:00
test_image_utils.py cinder-volume: Stop masking IOError different than ENOSPC 2019-01-08 05:31:07 +00:00
test_manager.py Add service dynamic log change/query 2017-05-16 13:37:35 +02:00
test_paginate_query.py Don't use None value for sql query. 2017-02-04 09:31:27 +08:00
test_policy.py [policy in code] Add support for attachment resource 2017-09-26 03:19:20 +00:00
test_qos_specs.py Add enough notification for QoS 2018-01-18 14:04:29 +08:00
test_quota.py Removed gb quota decrement in grp snapshot delete 2017-12-11 13:02:21 -06:00
test_quota_utils.py Cinder consistency group returning generic error message 2016-12-21 12:52:06 +08:00
test_rpc.py Fix notification short-circuit 2017-02-01 17:11:14 +01:00
test_service.py Use InvalidConfigurationValue instead of InvalidInput 2018-04-11 19:25:48 +08:00
test_service_auth.py Add service_token for cinder-nova interaction 2017-12-15 12:04:23 +05:30
test_setup_profiler.py Use constants for cinder-volume 2017-12-29 09:05:08 +08:00
test_ssh_utils.py Stop a connections leak when freeing an SSHPool 2018-02-14 18:16:55 -06:00
test_test.py Fix test_rpc_consumer_isolation for oslo.messaging 5.31.0 2017-09-06 15:12:45 -04:00
test_test_utils.py Update oslo.context RequestContext args 2017-11-21 14:56:06 -06:00
test_utils.py [Logging] Enable filtering of trace_api logs 2018-06-29 10:04:55 -03:00
test_volume_cleanup.py Clean up image tmp file if c-vol gets restarted 2017-01-17 17:28:39 +08:00
test_volume_configuration.py Add support for shared "backend_defaults" config 2017-07-11 18:58:58 +00:00
test_volume_glance_metadata.py
test_volume_throttling.py Implement privsep boilerplate in cinder. 2018-06-06 09:42:54 +08:00
test_volume_transfer.py Transfer snapshots with volumes 2018-07-19 09:42:43 +08:00
test_volume_types.py Delete related encryption provider when a volume type is deleting 2019-01-09 09:35:38 -05:00
test_volume_types_extra_specs.py
test_volume_utils.py Implementation of Cinder driver over FC for Inspur InStorage 2018-03-30 07:38:54 +08:00
utils.py Extend timeout for database migration tests 2019-09-26 11:14:53 -04:00