tests: Add 'reason' argument to exceptions

This resolves some warnings that were getting spewed out at the
beginning of a test run.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I2dd898daeccb2fe2ac6485a90585f314ede0cd9c
This commit is contained in:
Stephen Finucane 2023-09-29 08:32:30 +01:00
parent 398722be59
commit f500c5877a

View File

@ -610,7 +610,7 @@ class DataManagerTestCase(test.TestCase):
self.context, share_info['id'],
{'status': constants.STATUS_AVAILABLE})
@ddt.data(None, exception.ShareDataCopyFailed())
@ddt.data(None, exception.ShareDataCopyFailed(reason='fake'))
def test__run_backup(self, exc):
share_info = db_utils.create_share(status=constants.STATUS_AVAILABLE)
backup_info = db_utils.create_backup(
@ -780,7 +780,7 @@ class DataManagerTestCase(test.TestCase):
self.context, share_info['id'],
{'status': constants.STATUS_BACKUP_RESTORING_ERROR})
@ddt.data(None, exception.ShareDataCopyFailed())
@ddt.data(None, exception.ShareDataCopyFailed(reason='fake'))
def test__run_restore(self, exc):
share_info = db_utils.create_share(status=constants.STATUS_AVAILABLE)
backup_info = db_utils.create_backup(