At least some of these tests can leak notifications
such as backup.createprogress.
Mock the send notification methods to ensure this
doesn't happen.
This likely indicates that some restructuring of these
tests is needed, but patching this long-standing issue
on its own is worthwhile.
Partial-Bug: #
1501745
Change-Id: I91cb3bef18a8b830fcc3b3589afe6b6975bc0c2b
for _i in range(0, 64):
self.volume_file.write(os.urandom(1024))
+ notify_patcher = mock.patch(
+ 'cinder.volume.utils.notify_about_backup_usage')
+ notify_patcher.start()
+ self.addCleanup(notify_patcher.stop)
+
def test_backup_swift_url(self):
self.ctxt.service_catalog = [{u'type': u'object-store',
u'name': u'swift',