tests/backup: report failure when error was expected but none detected

This commit is contained in:
Marek Marczykowski-Górecki 2016-03-14 13:07:58 +01:00 committed by Wojtek Porczyk
parent e5af64f2bf
commit 44eed25511

View File

@ -774,6 +774,9 @@ class BackupTestsMixin(SystemTestsMixin):
errors = []
if expect_errors is None:
expect_errors = []
else:
self.assertFalse(self.error_detected.empty(),
"Restore errors expected, but none detected")
while not self.error_detected.empty():
current_error = self.error_detected.get()
if any(map(current_error.startswith, expect_errors)):