cinder/cinder/tests/unit/objects
Rodrigo Barbieri f3cdc27563 Fix cross-project incremental backups
This patch addresses the scenario where an
incremental backup can be created having a
parent backup that was taken in a different
project. This scenario ultimately leads to
a silent error when creating/deleting the
incremental backup and quotas going out of
sync.

The proposed fix is to narrow the backup search
down to the same project. To achieve this, a
method's signature had to be updated to achieve
the desired optimized behavior of passing the
volume's project_id parameter.

Closes-bug: #1869746
Closes-bug: #1873518

conflicts:
    cinder/tests/unit/backup/test_backup.py

Test test_create_backup_failed_with_empty_backup_objects
required a mock for
test_create_backup_failed_with_empty_backup_objects
which had been removed in ussuri, as part of commit
f0211b53b8. That
commit removed code and leftover the mock, which I
had removed in the change this patch was
cherry-picked from, as it was unnecessary.

The removed code section of cinder/backup/api.py
from commit f0211b53b8
does not impact the functionality of this change at all.

Change-Id: Icb621ff5966133f59d9d43ca2dd9f8e1919b1149
(cherry picked from commit 8ebeafcbba)
(cherry picked from commit 5358c996b4)
2020-07-02 19:39:00 -03:00
..
__init__.py Make c-vol use workers table for cleanup 2016-11-03 10:17:38 +01:00
test_backup.py Fix cross-project incremental backups 2020-07-02 19:39:00 -03:00
test_base.py Fix leftovers after backup abort 2018-02-01 12:08:23 +01:00
test_cgsnapshot.py Update OVO instance on destroy method call 2016-07-22 17:54:00 +02:00
test_cleanable.py Prevent claiming and updating races on worker 2017-01-19 10:42:24 +01:00
test_cleanup_request.py Add cleanable base object and cleanup request VO 2016-10-04 15:17:31 +02:00
test_cluster.py Add support for promoting a failed over backend 2018-05-09 12:19:33 -04:00
test_consistencygroup.py Remove cgsnapshot_id before snapshot.save 2016-12-03 16:23:43 -05:00
test_fields.py Add VolumeAttachStatus Enum 2016-11-09 17:10:27 -06:00
test_group.py Correct the use of assertTrue 2018-12-18 08:38:40 +00:00
test_group_snapshot.py Use GroupSnapshotStatus enum field 2017-07-05 01:24:00 +00:00
test_group_type.py Add group type and group specs 2016-07-08 14:26:39 -04:00
test_manageable_volumes_snapshots.py Switch ManageableSnaphots & ManageableVolumes list to OVO 2017-01-25 00:41:30 +00:00
test_objects.py Support Incremental Backup Completion In RBD 2019-08-23 23:52:22 -03:00
test_qos.py Test: Fix assert_has_calls dict order bug (QoS) 2017-01-23 10:58:28 -05:00
test_service.py OVO: support query for disabled services 2018-03-29 11:27:49 -04:00
test_snapshot.py Fix Snapshot object metadata loading 2019-02-23 06:42:00 -05:00
test_volume.py Fix DetachedInstanceError for VolumeAttachment 2019-07-31 21:06:21 +02:00
test_volume_attachment.py Fix DetachedInstanceError for VolumeAttachment 2019-07-31 21:06:21 +02:00
test_volume_type.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00