cinder/cinder/tests/unit/backup
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
..
drivers Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
__init__.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
fake_backup.py Add user_id in backup list and show API 2018-12-12 00:52:05 -05:00
fake_google_client.py Do not use 'self' in classmethod 2019-05-05 11:14:04 +08:00
fake_google_client2.py Do not use 'self' in classmethod 2019-05-05 11:14:04 +08:00
fake_service.py Remove obsolete get_backup_driver functions 2019-04-26 08:20:02 -04:00
fake_swift_client.py Do not use 'self' in classmethod 2019-05-05 11:14:04 +08:00
fake_swift_client2.py Do not use 'self' in classmethod 2019-05-05 11:14:04 +08:00
test_backup.py Fix cross-project incremental backups 2020-07-02 19:39:00 -03:00
test_chunkeddriver.py Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
test_rpcapi.py Add service dynamic log change/query 2017-05-16 13:37:35 +02:00