cinder/cinder/tests/unit/db
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
..
__init__.py Files with no code must be left completely empty 2016-09-28 16:29:30 +07:00
test_cluster.py Move service and cluster creation in test to utils 2017-01-19 10:42:23 +01:00
test_migrations.py Extend timeout for database migration tests 2019-09-26 11:14:53 -04:00
test_name_id.py DB: Optimize volume_update method 2016-11-08 12:31:06 +01:00
test_orm_relationships.py Make volume soft delete more thorough 2020-02-03 17:58:54 +00:00
test_purge.py Allow purging of records less than 1 day old 2017-11-28 17:47:24 +00:00
test_qos_specs.py Add enough notification for QoS 2018-01-18 14:04:29 +08:00
test_reset_backend.py Add support for promoting a failed over backend 2018-05-09 12:19:33 -04:00
test_transfers.py Transfer snapshots with volumes 2018-07-19 09:42:43 +08:00
test_volume_type.py Trivial fix PEP 8 coding style violation and typo 2017-05-03 19:47:22 +07:00